0

I have extracted compiled files from exe (executable in windows) using PyInstaller Extractor script.

In Resultant folder, i have got was pyc files bundled in pyz folder. Then I decompiled files (using uncompyle6) from pyc to py. Then updated code in py files and recompiled back to pyc files.

My question is how can i convert these pyz bundled folder back to 'exe' so that it can be executed in windows?

I tried pyinstaller, but could not find any .spec file or entry py file to begin this process. what are the steps to achieve this required result.

  • once you have py file you can use py2exe to wrap it in an exe. – sudhackar Jun 6 at 17:27
  • i understand pyinstaller or py2exe can be used to convert project to exe. but problem is pyz folder has more than 100 pyc files, which file could be used as entry file that is unknown. – RS Gamer Jun 7 at 5:05
  • e.g. python setup.py py2exe , but how to determine what's setup.py file, which is linked to all other remaing files. or pyinstaller abc.py --onefile or using spec file pyi-build foobarzap.spec but i have got compiled files in pyc format, so what the way around to compile those to one exe file. i am trying to accomplish something like this hshrzd.wordpress.com/2018/01/26/… – RS Gamer Jun 7 at 5:09
  • I have found the file which is the entry file, it is of file type. So I have copied first 8 bytes header from other (pyc) file to this entry file and tried to decompile it. But it is saying invalid marshal code. Now my concern is how many bytes and from which point shall I copy header from other file. So that I have correct header information. Python version is 2.7 – RS Gamer Jun 8 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.