modifying a python executable file

welly_59

Power Member
Joined
Aug 30, 2011
Messages
697
Reaction score
265
i have an exe file which was created in python and bundled into an exe using py2exe. I wish to modify one of the modules within the exe. I have succesfully unzipped the .pyc file i want to modify and converted it back to .py and modified it successfully. Now i need to somehow get this modified .pyc file back into the exe. is there a way to do so?

with py2exe you have two choices when bundling the exe - include all modules within the exe or to have the main script as the exe and the rest within a library.zip file. This program has all the .pyc files included within the exe. When i extract all i lost the main script of the exe, and 7-zip will let me view the includes without extracting but not to insert or delete any from there
 
Have you tried running a cracking tool on it and just decompiling it? Haven't messed with Python much myself lately, but I recall using a program to do just this a while ago. I'll try to find the name of the decompiler and update here if I can. Good luck!
 
cheers mate! the problem is losing the .pyc file which is the main script of the exe. i have managed to get the rest of the included files but not the main one.
 
Have you still got the exe2py script? The link is not working on my end.
 
Back
Top