Does anybody have a suggestion for (non commercial) software to decompile byte-code Python (.pyc) files?Everything I've found seems to break...
Decompiling .pyc files
tools;decompilation;python
What Python version you're decompiling? Py3k is not well supported, but there are quite a few decompilers for 2.x. One of the latest projects is this:https://github.com/Mysterie/uncompyle2It runs on Python 2.7 but supports decompiling 2.5 to 2.7.Note that some commercial projects has been known to use modified Python interpreters. Modifications can include:bytecode files encryptionchanged opcode values or additional opcodesa heavily customized runtime (e.g. Stackless Python)If you need to handle this, one approach is to convert non-standard bytecode to standard one and then use the usual decompilers (this apparently was used by the people from above project to decompile Dropbox code). Another is to change the decompiler to directly support the variations.