python-snippet-decompiler
python-snippet-decompiler copied to clipboard
Help
Hello,
I tried to use your Python Snippet Decompiler tool to decompile a set of bytecode instructions, but I encountered an issue. I ran the program and entered the bytecode instructions I need to decompile, but when I clicked the "Decompile" button, nothing happened, and the decompiled result was not displayed.
Please advise on what might be causing this issue and how I can resolve it. I'm confident that I entered the bytecode instructions correctly, but I can't understand why the program is not displaying the result.
Thank you for your assistance.
Best regards, Rezko
You have to paste the bytecode instructions from the output of pydisasm
pydisasm -F bytes <file.pyc>
Check the README. https://github.com/extremecoders-re/python-snippet-decompiler?tab=readme-ov-file#usage
it doesn't seem to work with python 3.12
Yes it is a known issue. xdis does not support Python 3.12.
The way the tool works is to parse each line in the input and extract the bytes in between the | characters. xdis can directly output the disassembly in that format, hence it is used.
If you can write a script which adds the instruction bytes to the disassembly listing of the standard python module dis - it should work too.