I have an application in Python compiled with py2exe.I have successfully extracted python scripts using Py2ExeDumper converted to .py using Easy Python Decompiler.I made some modification to the python code and recompiled .py files to .pyc files.Question : How can I rebuild the exe file using the new edited .pyc files ?Thanks
Modify py2exe packed executable
python;patch reversing
Instead of trying to rebuild the EXE from the .pyc files, you can just use py2exe to build a new EXE from the modified .py files.Alternatively, if you really want to replace the library in the original EXE, you would need to extract the EXE's PYTHONSCRIPT resource with a resource editor, un-marshal the array of code objects, replace the code object of your choosing in the array, re-marshal the array of code objects, and replace the PYTHONSCRIPT resource data with this new marshaled stream. You can look at _create_script_data in http://sourceforge.net/p/py2exe/svn/HEAD/tree/trunk/py2exe-3/py2exe/runtime.py for more details.