Description pcode(fun) obfuscates the code in fun.m and produces a file called fun.p, known as a P-file. If fun is a folder, then all the script or function files in that folder are obfuscated in P-files. MATLAB ® creates the P-files in the current folder.
The original.m file or folder can be anywhere on the search path. Pcode(fun1.,funN) creates N P-files from the listed files. If any inputs are folders, then MATLAB creates a P-file for every.m file the folders contain.
Pcode(fun,'-inplace') creates P-files in the same folder as the script or function files. The pcode algorithm was redesigned in MATLAB 7.5 (Release R2007b). If your P-file was generated prior to MATLAB 7.5, it will not run in MATLAB 8.6 (Release R2015b) or later. Files generated in 7.5, or later versions, cannot run in MATLAB 7.4 or earlier. When obfuscating all files in a folder, pcode does not obfuscate any files within subfolders.
A P-file takes precedence over the corresponding MATLAB code file (.m) for execution, even after modifications to the code file. MATLAB does not display any of the help comments that might be in the original MATLAB code file (.m).
Mystery ranch. The famous western fiction writer Bob Morris arrives at the Henderson ranch. He quickly realizes the hanging, runaway horses, and the shootout are fakes for his benefit. But when a real robbery takes place he thinks it's another fake. About mystery ranch A product-driven company from the beginning, Mystery Ranch designs packs for the job that needs to get done, for the people committed to doing it, with the best materials available and the most durable construction methods that exist. Audience Reviews for Mystery Ranch This Movie Came from The Mill Creek Western Legends 50 Pack. Bob Morris (Tom Tyler) is an Easterner who writes cowboy stories. Mystery Ranch is an innovative pack company whose heritage and experience in the outdoors, coupled with modern designs and technologies, has given them a unique foothold in the backpacking industry. Their durable, high quality products make carrying any type of load through the backcountry as effortless as possible.
Not that I have heard of, however there may be a way to protect it in a different way: Due to lack of MWE, I came up with an example: I am assuming you know which variables you want to save. I have assumed here that variables A and B are to be saved. A is a double, B is a logical (different sizes).
![]()
No, there is no decoding method for P-coded functions. You can use the debugger to step through the code line by line, inspect changes to variables and get a list of called functions. But you cannot get the source code as clear text. And most likely: You are explicitly not wanted to!
A decompilation or reverse-engineering of a program usually conflicts with the license conditions and is illegal. EDITED This thread seems to show, that P-coding is less cryptic than I thought: EDITED 2 Modern Matlab versions prevent the debugging of P-files. @Jan: Jan, I think you missed my point.
I already said that the encryption was put in place on purpose to protect intellectual property, which is what I like. I meant to say that hacking P-code is possible but probably very difficult. I probably had a smirk on my face when I say 'hey, if you find a way, please let me know!' I didn't know hacking P-code is not a real challenge and I still believe it is going to be very hard. Are you afraid that math98 will take my word for it and go cracking the encryption?
He said he 'heard from an old MATLAB user that there are some ways to decrypt a pcode'. Is that 'old MATLAB user' referring to you? Walter didn't want to take that credit. @Yair: Sorry. I did not meant the term 'hacking' in any offending way and I'm definitely convinced from all I've seen and heared in the last years, that your work is legal and helpful for Matlab users and in consequence for TMW. I'm used to distinguish the illegal 'cracking' from the legal 'hacking', which means digging in the codes for the not barely obvious features. If any of your investigations and publications of the golden beans you've found is not legal -what is not the case!-, I'd strongly recommend that you get payed by TMW to catch up a legalization retrospectively.
![]() ![]() Matlab P File Decrypter
Anyhow, Yair, I've deleted the concerning comment, because I know that the term 'hacking' might be misunderstood.
Creating P-Code Files:: M-File Programming (Programming) Programming Creating P-Code Files You can save a preparsed version of a function or script, called P-code files, for later MATLAB sessions using the function. For example,. pcode average parses average.m and saves the resulting pseudocode to the file named average.p.
Matlab Gui Tabs
This saves MATLAB from reparsing average.m the first time you call it in each session. MATLAB is very fast at parsing so the pcode function rarely makes much of a speed difference.
One situation where pcode does provide a speed benefit is for large GUI applications. In this case, many M-files must be parsed before the application becomes visible. You can also use pcode to hide algorithms you have created in your M-file, if you need to do this for proprietary reasons. Providing Help for Your Program M-File Scripts and Functions © 1994-2005 The MathWorks, Inc. Automobile Accessories.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |