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