Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAD MAGIC! (Python -1.-1) #441

Open
kevinkarlssonbr opened this issue Feb 18, 2024 · 5 comments
Open

BAD MAGIC! (Python -1.-1) #441

kevinkarlssonbr opened this issue Feb 18, 2024 · 5 comments

Comments

@kevinkarlssonbr
Copy link

C:\Users\water\Desktop\Desc\output_59773521>pycdas fishing.pyc
Bad MAGIC!
fishing.pyc (Python -1.-1)

12

Can someone help me?

@greenozon
Copy link
Contributor

most probably your pyc is encrypted/obfuscated
would be better if you attach

@kevinkarlssonbr
Copy link
Author

the python file that I decompiled is version 3.12.1, could this be the reason for the error? pycdas supported for this version?

@greenozon
Copy link
Contributor

I've just tried to compile some simple python code into .pyc using both 3.12.0 and 3.12.1
the output .pyc was 100% same

are you sure your pyc is not encrypted/obfuscated?

@kevinkarlssonbr
Copy link
Author

fish.zip

this is the file, could you see it?

@greenozon
Copy link
Contributor

well, you .pyc is not a valid python pyc module
why?
first 2 bytes (a word) is not a valid one
here is a full list of valid MAGIC values: https://github.com/python/cpython/blob/db145c72b853779a5349f4b8a5d21f6c2ae0c52e/Lib/importlib/_bootstrap_external.py#L242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants