-
-
Notifications
You must be signed in to change notification settings - Fork 414
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
Attempt to unmarshal headerless bytecode #320
Comments
FWIW I'm pretty sure the error was from the somewhat outdated host python version and/or an outdated xdis. |
Hi - Glad you figured out a way around your problem. I always appreciate feedback on how uncompyle is working. uncompyle is largely a one-person project, done out of interest and in my spare time. There are many issues that come up and the order that I can address them in is somewhat arbitrary. Also, I'm working on multiple projects, so it might take years before I get to any one particular issue. I'm in the process of putting together a system so that people who want to support me can get priority. Again, thanks for the feedback. |
I think the simplest method to start with would just be to add a flag that will try every xdis version and see what doesn't error? This way no cleverness is needed. |
It is true that the place to address this is in And there really isn't any no cleverness needed. I am happy to wait until someone wants to do this properly or there is funding for the endeavor. |
Closing here since we are not fixing here. |
I ran into a situation where I needed to decompile serialized code objects (marshal.dumps), however the uncompyle cli operates on pyc files, and I was doing something wrong when I tried to dump the code as if it was a pyc (I suppose I didn't try hard enough, but it wasn't needed anyway).
The error:
My code:
It would have been great if uncompyle can ingest a raw bytecode file with a specified version;
what I ended up doing was importing uncompyle.main and calling
decompile(...)
manually with the code object as an argument, and it worked great.It could be useful if uncompyle can brute force / autodetect an unknown bytecode version, but I don't know how commonly this is necessary in practice.
This way, code files can be dumped to disk and uncompyle can be run with the usual flags and interface recursively.
The text was updated successfully, but these errors were encountered: