pycdc icon indicating copy to clipboard operation
pycdc copied to clipboard

python3.9 decompile incomplete

Open ahmedmoselhi opened this issue 2 years ago • 4 comments

pycdc EvgQuickSignal.pyc > EvgQuickSignal.py
Unsupported opcode: WITH_EXCEPT_START
Unsupported opcode: WITH_EXCEPT_START
Unsupported opcode: JUMP_IF_NOT_EXC_MATCH
Unsupported opcode: JUMP_IF_NOT_EXC_MATCH
Unsupported opcode: JUMP_IF_NOT_EXC_MATCH
Unsupported opcode: WITH_EXCEPT_START
Unsupported opcode: RERAISE
Unsupported opcode: WITH_EXCEPT_START
Unsupported opcode: WITH_EXCEPT_START
Unsupported opcode: JUMP_IF_NOT_EXC_MATCH
Unsupported opcode: WITH_EXCEPT_START
Unsupported opcode: RERAISE

ahmedmoselhi avatar Apr 28 '22 21:04 ahmedmoselhi

EvgQuickSignal.pyc.zip attached pyc file EvgQuickSignal.txt pysdas txt

ahmedmoselhi avatar Apr 28 '22 21:04 ahmedmoselhi

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!

karjok avatar Jun 06 '22 02:06 karjok

@karjok 's solution fixes it perfectly!

franfrancisco9 avatar Jun 07 '23 18:06 franfrancisco9

@karjok

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

And now it works?

deprool avatar Jul 08 '23 22:07 deprool

Duplicate #450

zrax avatar Feb 21 '24 22:02 zrax