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

Possible wrong magic number for python 2.4a0 #69

Closed
wizzycom opened this issue Dec 24, 2020 · 4 comments
Closed

Possible wrong magic number for python 2.4a0 #69

wizzycom opened this issue Dec 24, 2020 · 4 comments

Comments

@wizzycom
Copy link

wizzycom commented Dec 24, 2020

Hello,

First of all, that you for your effort on this. It is really a great tool!

It seems that magic number for python 2.4a0 is possibly declared wrong.

add_magic_from_int(62041, "2.4a0")

Had to decompile some .pyc files of that version and I had some issues which were resovled by changing to

add_magic_from_int(62031, "2.4a0")

And it works perfectly.

@rocky
Copy link
Owner

rocky commented Dec 24, 2020

This is something that is easly checked. https://github.com/python/cpython/blob/ef82d2fdfe1aba18e29abbd59b22d19d490e9fca/Python/import.c#L52 listes 62041 as the final magic number for "2.4a0".

However in python/cpython@ef82d2fdfe1 you'see that it had been 62031.

First of all, that you for your effort on this. It is really a great tool!

Sure, but open source is only as good as people willing to work on it. Feel free to work on something that might handle this. Perhaps an option on or parameter to override or add to the magic number?

@rocky
Copy link
Owner

rocky commented Dec 24, 2020

See #70

@rocky rocky closed this as completed Dec 24, 2020
@wizzycom
Copy link
Author

My knowledge in python is limited. Elementary I might say. As an open source enthusiast, I agree that open source is only as good as people willing to work on it but there are always limits to what some people can do. Anyway, the only thing sure is that I will learn something new. I will update with my findings

Thank you!

@rocky
Copy link
Owner

rocky commented Dec 24, 2020

but there are always limits to what some people can do

While there is truth to this, it is also, well, limiting. No one is born understanding how to do cross-disassembly and if you were task me as a kid would I be doing this, I would have looked at you dumbfounded if not said "absolutely not".

There are other ways to contribute to - use your imagination. But failing that, then consider sponsoring the project and/or people doing this.

@rocky rocky changed the title Possible wrong magin number for python 2.4a0 Possible wrong magic number for python 2.4a0 Dec 24, 2020
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