-
Notifications
You must be signed in to change notification settings - Fork 675
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
Support Python 3.9 decompilation #450
Comments
When to support it |
will support if you don't asking again |
Thank you for maintaining this awesome project. ❤️ |
1 similar comment
Thank you for maintaining this awesome project. ❤️ |
still waiting for JUMP_IF_NOT_EXC_MATCH |
give them sometime. |
@zrax, I think that I found some hints on how to handle some of the missing optcodes for python 3.9: I was getting |
Hi, I do not bring good news: I have analyzed the bytecode of Python 3.8, 3.9, 3.10 and 3.11 in regard to try-except-finally blocks, which are super common in Python scripts, and they all change logic from one version to another. I am currently focusing on 3.9 on my spare time and needless to say, it's already a headache. I do not fully grasp pycdc's code base, but I did try other alternatives such as the one mentioned by @Ma5onic to no avail. My first observation as for Python 3.9: My second observation as for Python 3.8/3.9: This is probably not going to come as a surprise to anybody but adding support for any of these versions in pycdc is IMHO "dead weight". It is already too late. The bytecode has evolved faster than decompilers could (not blaming their maintainers, this is just an observation) and if someone suddenly wants to write or update one, he isn't going to be trying to maintain all the skipped versions. He's going to go straight for 3.12 or higher, and increment the decompiler version major. As an example, I am trying to decompile a Nonetheless, I will continue to tinker with |
Good news, I've got a working try-except-finally candidate for Python 3.8 AND 3.9. It's probably buggy in some cases I did not find yet, but for simple scripts, it works. What I did was to emulate new and/or removed opcodes with already implemented opcodes so that I did not have to re-invent the wheel. @zrax I've noticed the TODO list is missing a recent PR you merged, I also add the PR I just opened as a reference. |
Tasks
RERAISE
WITH_EXCEPT_START
LOAD_ASSERTION_ERROR
LIST_TO_TUPLE
IS_OP
CONTAINS_OP
JUMP_IF_NOT_EXC_MATCH
LIST_EXTEND
SET_UPDATE
DICT_MERGE
DICT_UPDATE
The text was updated successfully, but these errors were encountered: