4

I have been really struggling trying to decompile one python 3.9 .pyc binary. Most tools that i've tried, such as: decompile3, uncompyle6, ..etc seem to all return me the error

ImportError: Unknown magic number 23117

However, one of the tools did work to an extent. It's called python-exe-unpacker (https://github.com/countercept/python-exe-unpacker) and it did manage to unpack the binary partially. Here is the output it gives.

[*] On Python 3.9
[*] Processing File.pyc
[*] Pyinstaller version: 2.1+
[*] This exe is packed using pyinstaller
[*] Unpacking the binary now
[*] Python version: 39
[*] Length of package: 6598404 bytes
[*] Found 31 files in CArchive
[*] Beginning extraction...please standby
[*] Found 232 files in PYZ archive
[*] Successfully extracted pyinstaller exe.

In the unpack folder that it produces it extracts various files, one of which is python39.dll and the supposed source code of the .pyc file, except that it is quite corrupted and you can only read very small and few parts of it (mainly strings and function names). So is there any way in which I might be able to fully decompile it and get the full source code of the application?

Bl4ckC4t
  • 137
  • 3
  • 11
  • Please clarify what you are trying to do. The title and beginning is about decompiling a ``.pyc`` file, the ending about a ``.dll`` file. These are, simply put, entirely different things. – MisterMiyagi Feb 21 '21 at 13:22
  • 1
    I just want to decompile the .pyc fully – Bl4ckC4t Feb 21 '21 at 17:00

0 Answers0