From: Giovanni Ughi on 2 Aug 2010 09:31 "us " <us(a)neurol.unizh.ch> wrote in message <i36fmc$sdq$1(a)fred.mathworks.com>... > "Giovanni Ughi" > > I am talking about p-files (matlab pcode to encrypt a m-file). > > As far as I know I cannot open and edit them anymore. Or am I wrong? > > in general: yes... > however, look at this recent thread... > > http://www.mathworks.com/matlabcentral/newsreader/view_thread/271697#713066 > > us this means that you can get info about the variables which are used in the code and relative values (like password values of 12 in that examples) not that you can edit and open them. So this means that you can not override a p-file as far as I know.
From: us on 2 Aug 2010 09:40 "Giovanni Ughi" <giovanni.ughi(a)gmail.com> wrote in message <i36hbb$fve$1(a)fred.mathworks.com>... > "us " <us(a)neurol.unizh.ch> wrote in message <i36fmc$sdq$1(a)fred.mathworks.com>... > > "Giovanni Ughi" > > > I am talking about p-files (matlab pcode to encrypt a m-file). > > > As far as I know I cannot open and edit them anymore. Or am I wrong? > > > > in general: yes... > > however, look at this recent thread... > > > > http://www.mathworks.com/matlabcentral/newsreader/view_thread/271697#713066 > > > > us > > this means that you can get info about the variables which are used in the code and relative values (like password values of 12 in that examples) > > not that you can edit and open them. So this means that you can not override a p-file as far as I know. well... you can replace/overload a P-file like any other (ML) file as long as you have permission to do so, which depends on the (admin) setup of the folder(s) etc... us
From: Jan Simon on 2 Aug 2010 19:07 Dear Giovanni, > I was just looking for something reasonably safe. > "Clock" is safe enough, but the problem that a user can easily modify the system date and time is not yet fixed. > > Someone can tell me more about that or about any other alternatives? For Windows: Get the modification date of the Windows directory. Either: FileObj = java.io.File(getenv('WINDIR')); FileObj.lastModified (of course you have to convert the numerical format) Or use a Mex: http://www.mathworks.com/matlabcentral/fileexchange/24671 Of course this is not "secure": If you run your computer with the wrong date all the time, even the modification dates are wrong. Another idea: Let the user run a file, which checks the output of "!ver" (the version of the OS). Then compare the output in your P-file. Am I right: The version number changes with each patch, and nobody would disable the automatical updates??? If your program is really expensive, buy a cheap used laptop, install a trial version of Matlab, obfuscate the P-file as much as possible and check all hardware IDs you can access (User-SID, !powercfg /devicequery all_devices_verbose, dates of creation of the hard disks/WIN directory/Matlab installation, etc). But finally be aware that some famous manufactures of software do not perfrom such tricks. So perhaps *trust* is the right way. Kind regards, Jan
From: Andy on 3 Aug 2010 08:38 > But finally be aware that some famous manufactures of software do not perfrom such tricks. So perhaps *trust* is the right way. > > Kind regards, Jan Trust, or a network license manager, which was suggested much earlier and, although more complicated than a time bomb, is probably as secure as you're going to get (or need).
From: per isakson on 12 Aug 2010 22:23
"us " <us(a)neurol.unizh.ch> wrote in message > > > > But, if I change the windows .... > > > > Quick fix: use builtin('clock') to get the current date and time as a datevec, and compare that to your time bomb date. > > well... then the user overloads BUILTIN... > > us d = evalc( 'system(''date /T'')' ); is that any safer? / per |