Having recently watched/read a presentation given by Dave Kennedy at DEF CON 20 [PDF], I'd like to know how to decompile a Python script compiled with PyInstaller.In his presentation, he is creating a basic reverse shell script in Python, and converts it to an EXE with PyInstaller.My question is how do you take a PyInstaller created EXE and either completely, or generally, retrieve the logic/source code from the original Python script(s)?
How do you reverse engineer an EXE compiled with PyInstaller
python;pe
extract EXE's appended data (block starting with PYZ, until the end of the file)extract wanted files with PyInstaller's archive viewerdecompyle .PYCs - I personally recommend Uncompyle2 for that.