How to decrypt a pcode?

156 次查看(过去 30 天)
math98
math98 2011-6-20
评论: Walter Roberson 2026-1-26,23:11
Hi,
Is there an experienced MATLAB user to provide me with some info on how to decrypt a given pcode?
P.S: It seems that I have to use a pcode version of my original code. Actually, I heard from an old MATLAB user that there are some ways to decrypt a pcode. (to obtain the original code) Of course, by advanced user (hackers :-O ) not newbies!!
Thanks
  6 个评论
Yousif
Yousif 2026-1-26,22:54
Sorry, i am not asking for dycripting a pcode, i am asking of how to make and run a pcoded script ? it was a language problem.
Walter Roberson
Walter Roberson 2026-1-26,23:11
pcode FILENAME
removes any .m suffix from FILENAME and produces FILENAME.p output.
After that, the source code FILENAME.m can be removed (perhaps put in a different directory) and the MATLAB code will continue to work using FILENAME.p .
If there is both a FILENAME.p and FILENAME.m then the .p version will be used, but FILENAME. will be consulted for the purposes of the help command -- so you can create FILENAME.m with just the help documentation and FILENAME.p with the encoded executable and the .p will be executed but the .m will be used for help purposes.

请先登录,再进行评论。

采纳的回答

Jan
Jan 2011-6-20
编辑:Jan 2017-12-26
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: http://www.mathworks.com/matlabcentral/answers/75012-pcode-obfuscation-cracked-alternatives
[EDITED 2] Modern Matlab versions prevent the debugging of P-files.
  5 个评论
Jan
Jan 2011-6-20
编辑:Jan 2013-8-2
@math98: Matlab has some undocumented features. I'd go into details, if I see a legal demand. Some general remarks about the security of P-files: http://www.mathworks.com/matlabcentral/newsreader/view_thread/284802 , http://www.mathworks.com/matlabcentral/newsreader/view_thread/271697
wonderkismet
wonderkismet 2020-12-10
编辑:Rik 2020-12-10
Click to Send Request for pcode Recovery [link removed]

请先登录,再进行评论。

更多回答(4 个)

ou dk
ou dk 2020-1-2
in fact ,i can decrypt all type code,include standalone program,p code,other language compiled matlab program.
  24 个评论
Rik
Rik 2023-8-18
Given Bruno's posting history, I doubt trolling is likely. While it is improbable for someone to crack the p-code encryption, it is not impossible. Escpecially the caveat that only specific version(s) are cracked lends some credibility to the claim.
Walter Roberson
Walter Roberson 2023-8-18
I know of at least five people who have made credible claims that they know how decode older .p files.
I do not know whether anyone has decoded the newer .p files as of a small number of releases ago.

请先登录,再进行评论。


Meme Young
Meme Young 2020-8-11
Oh man you have really asked a good question, like claiming yourself to be a bank robber in front of a police department
  6 个评论
ou dk
ou dk 2020-8-22
A small number of files are available, but you can't use them for profit.
Yousif
Yousif 2026-1-26,22:59
sorry again, i did not understand the word dycript, i meant the opposite how to pcode.

请先登录,再进行评论。


Fangjun Jiang
Fangjun Jiang 2011-6-20
I thought the Mathworks could do it. But they won't do it. After all, it is put in place to protect many of its source code (part of the reason, I believe). It can be used to protect the user's customer-developed source code too, which is what I like. Hacking is possible, technically. If you find a way, please let me know.
  9 个评论
Yair Altman
Yair Altman 2011-7-21
@Jan - I have just seen this thread and I must say that I take offense at being labeled a cracker or hacker. For the record, and you can quote me on this, none of what I do or publish is illegal, to the best of my knowledge and intentions. I am very careful about this. My livelihood depends on Matlab to a large extent and I will not cut the branch I'm sitting on.
Jan
Jan 2011-7-21
@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.
Anyhow, Yair, I've deleted the concerning comment, because I know that the term "hacking" might be misunderstood.

请先登录,再进行评论。


jgd0008
jgd0008 2018-2-9
I know it´s an old subject. This guy had an utility running on the web. I used a couple of times, had some minor flaws. However, it´s been asked to be taken down.
web-service.sippey.org/de_pcode
So, it´s possible
  2 个评论
MOUSSAOUI FAOUZI
MOUSSAOUI FAOUZI 2021-12-31
Hello, all my Matlab files have been encrypted by ransomware online. Is there a way to recover and decrypt Matlab files? Thank you. moussaoui39fa@gmail.com
Walter Roberson
Walter Roberson 2021-12-31
Files that have been encrypted by ransomware are probably not recoverable by any method known to Mathworks.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Programming Utilities 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by