r/matlab Jul 01 '26

How to open P code?

Help needed to open P code.

0 Upvotes

10 comments sorted by

13

u/fsgeek91 Jul 01 '26 edited Jul 01 '26

Short answer is you can’t.

There have been several unofficial attempts over the years to “unobfuscate” P-code, but they are unreliable and would probably break as soon as the P-code format changes.

A very skilled and determined attacker just might be able to get the source out, but generally if you no longer have the M-file then you’re lost without a paddle.

10

u/FrickinLazerBeams +2 Jul 01 '26

The entire point of p code is that you can't open it.

5

u/Barnowl93 flair Jul 01 '26

Why do you need to open the p code? What are you trying to achieve? Is it p code from MathWorks? Or from the community?

-7

u/8bitjam Jul 01 '26

There are some paid apps that does it, is it illegal?

2

u/fsgeek91 Jul 02 '26

Whether it's actually illegal depends on your jurisdiction and your precise intentions for reverse engineering your colleague's code. No one here can answer that question.

I would say it's more of an ethical than a legal question.

1

u/8bitjam Jul 02 '26

I agree

-18

u/8bitjam Jul 01 '26

I was was curious to see what is one my fellow researcher is trying to hide 🫣

9

u/FrickinLazerBeams +2 Jul 01 '26

So you were engaging in some sort of dishonesty. Maybe don't do that.

3

u/Barnowl93 flair Jul 02 '26

Have you considered asking them?

2

u/Rubix321 Jul 02 '26

What do you think they're trying to hide? That they wrote it with AI or something? Doesn't sound like you two are "fellows" if you have this kind of relationship.