Pyinstaller Defactor是一个Python脚本,用于提取Pyinstaller生成的可执行文件的内容。
PYC文件的标题会自动修复,以便Python字节码分解器可以识别它。该脚本可以在Python 2.x和3.x上运行。 PyInstaller versions 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.5.1, 4.6, 4.7, 4.8, 4.9, 4.10, 5.0, 5.0.1, 5.1, 5.2, 5.3, 5.4, 5.4.1, 5.5, 5.6, 5.6.1, 5.6.2, 5.7.0, 5.8.0, 5.9.0, 5.10.0, 5.10.1, 5.11.0, 5.12.0, 5.13.0, 5.13.1, 5.13.2, 6.0.0, 6.1.0, 6.2.0, 6.3.0, 6.4.0, 6.5.0, 6.6.0, 6.7.0, 6.8.0, 6.9.0, 6.10.0, 6.11.0, 6.11.1 are tested & supported.可能也将与其他版本一起使用。
该项目最初托管在SourceForge上。
可以通过将EXE的名称作为参数来运行脚本。
$ python pyinstxtractor.py <filename>
X:>python pyinstxtractor.py <filename>
建议在同一版本的Python中运行脚本,该脚本用于生成可执行文件。这是为了防止在提取PYZ档案时解散错误(如果有)。
X:> python pyinstxtractor.py test.exe
[+] Processing disttest.exe
[+] Pyinstaller version: 2.1+
[+] Python version: 36
[+] Length of package: 5612452 bytes
[+] Found 59 files in CArchive
[+] Beginning extraction...please standby
[+] Possible entry point: pyiboot01_bootstrap.pyc
[+] Possible entry point: test.pyc
[+] Found 133 files in PYZ archive
[+] Successfully extracted pyinstaller archive: disttest.exe
You can now use a python decompiler on the pyc files within the extracted directory
提取PYC后,您可以使用python的分解器,例如uncompyle6和docpyle ++。
X:> uncompyle6.exe test.exe_extractedtest.pyc
X:> uncompyle6.exe test.exe_extractedPYZ-00.pyz_extracted__future__.pyc
Pyinstxtractor可以在不需要其他工具的情况下本地提取Linux精灵二进制。
有关其他问题和信息,请参阅Wiki和FAQ
GNU通用公共许可证v3.0