Trouble reversing a .pyc file back to its source code

240 Views Asked by At

I have an EXE compiled using cx_Freeze, and the answer here pointed me to decompyle3 after getting the .pyc file: https://reverseengineering.stackexchange.com/questions/26257/how-to-reverse-engineer-cx-freeze-exes

I tried that but got an error Unknown magic number 3495. My Python version is 3.8.18, and I'm also getting:

I don't know about Python version '3.8.18' yet.
xdis might need to be informed about version '3.8.18'

Based on this, I modified the header of the .pyc file: https://book.hacktricks.xyz/generic-methodologies-and-resources/basic-forensic-methodology/specific-software-file-type-tricks/.pyc

Now, uncompyle6 says KeyError: '3.8.18' and decompyle3 says Unknown magic number 21773

I'm struggling to find resources on this topic, and I'm unfamiliar with decompiling pyc files.

0

There are 0 best solutions below