python-snippet-decompiler icon indicating copy to clipboard operation
python-snippet-decompiler copied to clipboard

Help

Open REZKO404 opened this issue 1 year ago • 4 comments

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

image

REZKO404 avatar Feb 10 '24 22:02 REZKO404

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

extremecoders-re avatar Feb 11 '24 07:02 extremecoders-re

it doesn't seem to work with python 3.12

REZKO404 avatar Feb 11 '24 09:02 REZKO404

image

REZKO404 avatar Feb 11 '24 11:02 REZKO404

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.

extremecoders-re avatar Feb 11 '24 12:02 extremecoders-re