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

#Decompyle incomplete - Python 3.9 please help #253

Closed
Flexium80 opened this issue Apr 26, 2022 · 5 comments
Closed

#Decompyle incomplete - Python 3.9 please help #253

Flexium80 opened this issue Apr 26, 2022 · 5 comments

Comments

@Flexium80
Copy link

Flexium80 commented Apr 26, 2022

#Decompyle incomplete on terminal python 3.9
Unsupported opcode: RERAISE

@Ahmed7fathi
Copy link

I hope someone solves this there is no decompile tool that can decompile python 3.9 yet

@karjok
Copy link

karjok commented Jun 6, 2022

I also had a similar error last night, when I tried to decompile the pyc file compiled with python 3.10, the message "Unsupported opcode: BLA_BLA_BLA" appears.

I think this is an error because the pyc file that will be decoded is a bytecode file compiled with python 3.9 and above, and the opcodes that are not supported by pycdc are opcodes that just appeared in python version 3.9 and above.

so I tried reading the ASTree.cpp file and studying it, then I realized that the opcode that was printed as an error was not in the "case block" of the ASTree.cpp file.

I tried to change it a little by adding the opcodes printed in the error message into the case block (on line 1166)

case Pyc::JUMP_IF_NOT_EXC_MATCH_A:
case Pyc::RERAISE_A:

then rebuild it. I don't know what happened but it solved my problem when trying to decompile python 3.9 and above bytecode. everything is done!

@canglanyue
Copy link

I also had a similar error last night, when I tried to decompile the pyc file compiled with python 3.10, the message "Unsupported opcode: BLA_BLA_BLA" appears.

I think this is an error because the pyc file that will be decoded is a bytecode file compiled with python 3.9 and above, and the opcodes that are not supported by pycdc are opcodes that just appeared in python version 3.9 and above.

so I tried reading the ASTree.cpp file and studying it, then I realized that the opcode that was printed as an error was not in the "case block" of the ASTree.cpp file.

I tried to change it a little by adding the opcodes printed in the error message into the case block (on line 1166)

case Pyc::JUMP_IF_NOT_EXC_MATCH_A:
case Pyc::RERAISE_A:

then rebuild it. I don't know what happened but it solved my problem when trying to decompile python 3.9 and above bytecode. everything is done!

after rebuild,Try to decompile, the program reports an error
image

@zrax
Copy link
Owner

zrax commented Feb 21, 2024

Duplicate #450

@zrax zrax closed this as completed Feb 21, 2024
@raymondren1982
Copy link

yes,it work, I change ASTree.cpp(1158line) as following:
case Pyc::JUMP_IF_FALSE_A:
case Pyc::JUMP_IF_TRUE_A:
case Pyc::JUMP_IF_FALSE_OR_POP_A:
case Pyc::JUMP_IF_TRUE_OR_POP_A:
case Pyc::POP_JUMP_IF_FALSE_A:
case Pyc::POP_JUMP_IF_TRUE_A:
case Pyc::POP_JUMP_FORWARD_IF_FALSE_A:
case Pyc::POP_JUMP_FORWARD_IF_TRUE_A:
case Pyc::INSTRUMENTED_POP_JUMP_IF_FALSE_A:
case Pyc::INSTRUMENTED_POP_JUMP_IF_TRUE_A:
case Pyc::RERAISE: //raymond ren
case Pyc::CALL_FUNCTION_EX_A:
case Pyc::JUMP_IF_NOT_EXC_MATCH_A:
{
PycRef cond = stack.top();
PycRef ifblk;
int popped = ASTCondBlock::UNINITED;

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

6 participants