I used pyinstaller to compile hello_world.py to 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
.pyor.pycfiles. It produces a large number of files but the only one of interest (source) is thehello_worldfile with no extension. - This
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 thehello_worldfile in hex using theASCII --> Hextool in Notepad++ and put the magic number at the start. I then renamed this file tohello_world.pycand run it through uncompyle6. This did not work and gave an error:ImportError: Unknown magic number 13621 in hello_world.pyc.
(Related questions, but no-one answered/replied: here and here)
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 .exe's.
Any advice is much appreciated.