Create a P-file for every. Because the input files are part of a class, MATLAB creates a folder structure so that the output file belongs to the same class. Create P-files in the same folder as the original. An input argument that does not have a file extension and is not the name of a folder must be a function on the MATLAB path or in the current folder.
The pcode function does not support live scripts or functions. If item resides within a package or class folder, then pcode creates the same package or class structure to house the resulting P-files. List of. The list can include a mix of files and folders. If a P-file was generated prior to Rb, then it will not run in versions Rb or later. Files generated in Rb or later do not run in Ra or earlier. In addition to your program, you may want to obfuscate other functions and scripts that your program is dependent upon.
To determine the files required to run your program, use the matlab. Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
Select the China site in Chinese or English for best site performance. Other MathWorks country sites are not optimized for visits from your location. Sign in to answer this question. Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:. Select the China site in Chinese or English for best site performance. Other MathWorks country sites are not optimized for visits from your location. Toggle Main Navigation. Search Answers Clear Filters. Answers Support MathWorks. Search Support Clear Filters. Support Answers MathWorks. Search MathWorks. MathWorks Answers Support.
Open Mobile Search. Trial software. You are now following this question You will see updates in your activity feed. You may receive emails, depending on your notification preferences. Safe to open P-code files? Show older comments. Engenuity on 20 Dec Vote 1. Commented: Engenuity on 22 Dec Accepted Answer: Jan. My question and concern is that I have purchased some. I would like to know what risks I assume by opening the files, especially the. My limited research on p-coded files explained that no one except those who have purchased the rights to view source code million dollar rights from MathWorks will be able to open or view the.
Are there any tools in addition to requiredFilesandProducts that I can use to determine a threat? Or is author trust the ultimate answer? Thanks in advance. Cancel Copy to Clipboard. It's pretty-much the latter; which sorta' begs the question of why would you buy from a vendor you don't trust? Guess you could start by using a workstation totally isolated from the rest of the network if you think there's really somesuch possibility, even. You cannot modify a P-file in a way, which allows to use it afterwards.
P-coding is the method in Matlab to hide the source code and to prevent further modifications. This is useful e.
For this purpose the P-files are encrypted. While you still can modify bytes of encrypted files how ever you want, you cannot expect that the result is still meaningful. You cannot "open" a P-file in a meaningful way. Modifications are not possible.
If you want to change the code of a P-coded function, you have to ask the author to do this for you. Maybe he is willing to share the original M-file with you, maybe he is not. P-coding includes an encryption. Of course any encryption can be hacked, but this would be illegal. Bruno Luong on 6 Sep It seems if you live in Europe, you are legally allowed to hack the encryption to correct error, from the source EDIT fix wrong link.
Article 5 of the Directive provides exceptions to the exclusive rights above, talking of reverse engineering in general. Such rights are not subject to the authorisation of the author when these acts are necessary to enable the legitimate purchaser to use the computer program in a manner consistent with its intended purpose, including correcting errors. Dear Bruno Luong , The documentation of pcode contains this carefully formulated warning:.
The pcode function obfuscates your program files and does not encrypt them, thus P-files should not be considered secure. P-coding files to protect your intellectual property is not recommended.
This means, that my wording "hacking" and "encryption" was not accurate. As a computer scientist I'd prefer a strong er encryption and the current P-format is not satisfying. I am very curious and my interest in encryption methods is not compatible to MathWork's interest in keeping the details concealed. The author of the P-file mentioned in the question does not want the source code to be accessible. I respect this intent.
From the from the source :. Therefore transforming p-code object code to m-code source code would be considered and decompilation and perfectly legally allowed in EU for fixing error purpose, if this is Sarib Malik intention, even without author authorisation. Bruno Luong : Thanks for the explanations. Following your legal arguments, the Sarib Malik is allowed to decompile P-code inside Europe. It was not my intention to allege, that the he has any illegal intentions. I'm not in the position to offer assistence for such a decompilation, maybe for legal reasons, maybe following the common sense, maybe it is my respect for the intention of MathWorks and many programmers who want to keep their codes hidden, maybe I like to avoid getting or making troubles beyond the chances to win the lawsuit, maybe I do not have running code.
I would not hesitate to decompile P-files, if I'm the author of the source codes. But a revealing of the algorithm in a public forum would mean loosing a tool with limited power for all Matlab users.
And, of course, the Matlab team would not like me anymore ;-. I've added a corresponding explanation to my answer. See Also.
0コメント