I used pyinstaller to compile
hello_world.exe. When I run pyinstxtractor on the .exe file, I get a large number of files. I have two problems, the second arose trying to fix the first:
- pyinstxtractor does not produce any
.pycfiles. It produces a large number of files but the only one of interest (source) is the
hello_worldfile with no extension.
hello_worldfile appears to be a .pyc file without the magic number. Using the code here showed that "my" magic number is (in hex)
0x550d0d0a. I viewed the
hello_worldfile in hex using the
ASCII --> Hextool in Notepad++ and put the magic number at the start. I then renamed this file to
hello_world.pycand run it through uncompyle6. This did not work and gave an error:
ImportError: Unknown magic number 13621 in hello_world.pyc.
Can anyone offer a solution to either one of these problems, so that I can get
.py files from
.exe files compiled by pyinstaller again? Noting that other programs such as unpy2exe do not work on pyinstaller
Any advice is much appreciated.
Source: Python Questions