吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 2937|回复: 13
收起左侧

[Unpackers] pyinstxtractor -- PyInstaller Extractor

  [复制链接]
风吹屁屁凉 发表于 2024-5-9 11:29

PyInstaller Extractor

PyInstaller Extractor is a Python script to extract the contents of a PyInstaller generated executable file.

The header of the pyc files are automatically fixed so that a Python bytecode decompiler will recognize it. The script can run on both Python 2.x and 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 are tested & supported. Probably will work with other versions too.

This project was originally hosted on SourceForge.

Usage

The script can be run by passing the name of the exe as an argument.

$ python pyinstxtractor.py <filename>
X:\>python pyinstxtractor.py <filename>

It is recommended to run the script in the same version of Python which was used to generate the executable. This is to prevent unmarshalling errors(if any) while extracting the PYZ archive.

Example

X:\> python pyinstxtractor.py test.exe
[+] Processing dist\test.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: dist\test.exe

You can now use a python decompiler on the pyc files within the extracted directory

After extracting the pyc's you can use a Python decompiler like Uncompyle6 and Decompyle++.

X:\> uncompyle6.exe test.exe_extracted\test.pyc
X:\> uncompyle6.exe test.exe_extracted\PYZ-00.pyz_extracted\__future__.pyc

Extracting Linux ELF binaries

Pyinstxtractor can natively extract Linux ELF binaries without requiring other tools.

For other questions and information, please see the Wiki and the FAQ

See also

  • pyinstxtractor-ng:
    A standalone binary version of pyinstxtractor. This tool doesn't require Python to run and can extract all supported versions of PyInstaller. It also supports encrypted pyinstaller executables.
  • pyinstxtractor-web: pyinstxtractor running in the web browser, powered by Go & GopherJS.

License

GNU General Public License v3.0

Download

https://github.com/extremecoders-re/pyinstxtractor/releases

pyinstxtractor.7z

4.74 KB, 下载次数: 55, 下载积分: 吾爱币 -1 CB

本帖被以下淘专辑推荐:

  • · 好帖|主题: 549, 订阅: 87

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

 楼主| 风吹屁屁凉 发表于 2024-5-9 11:32

pyinstxtractor-ng

pyinstxtractor-ng is a tool to extract the contents of a Pyinstaller generated executable file. Both Linux ELFs and Windows PE executables are supported.

This project is a fork of pyinstxtractor.

pyinstxtractor-ng uses the xdis library to unmarshal Python bytecode and as a result there is NO requirement to use the same Python version which was used to build the executable.

pyinstxtractor-ng also supports automatic decryption of encrypted pyinstaller executables.

Usage

Precompiled binaries for Linux and Windows are provided in releases.
These are generated using PyInstaller itself, so you don't even need a Python installation to run pyinstxtractor-ng

PyInstaller Extractor NG

positional arguments:
  filename       Path to the file to extract

optional arguments:
  -h, --help     show this help message and exit
  -d, --one-dir  One directory mode, extracts the pyz to the same directory

Pass the exe filename as an argument or drag & drop the pyinstaller exe file over pyinstxtractor.ng icon on Windows.

$ ./pyinstxtractor-ng <filename>
X:\> pyinstxtractor-ng <filename>

The --one-dir mode extracts the pyz in the same directory as the executable. This is useful if you want to run the extracted files straight-away.

X:\> pyinstxtractor-ng --one-dir main.exe
X:\> cd main.exe_extracted
X:\main.exe_extracted\> python main.py

See Also

  • pyinstxtractor-web: pyinstxtractor running in the web browser, powered by Go & GopherJS.

License

GNU General Public License v3.0

Download

https://github.com/pyinstxtractor/pyinstxtractor-ng/releases

bohong65 发表于 2024-5-9 12:37
这是攻,那么防呢?先转换成pyd,然后搞一个入口main文件调用pyd和三方库,打包时再加上--key选项破了一层发现还有一层应该会很惊喜
666888tzq 发表于 2024-5-9 12:29
zhenze 发表于 2024-5-9 12:30
感谢分享
三滑稽甲苯 发表于 2024-5-9 12:38
人话:可以反编译 PyInstaller 生成的可执行文件
Txily 发表于 2024-5-9 15:28
三滑稽甲苯 发表于 2024-5-9 12:38
人话:可以反编译 PyInstaller 生成的可执行文件

那么这样说,辛辛苦苦用GPT写的软件被小白轻松破了?
loading818 发表于 2024-5-9 19:01
感谢分享。
就是这么帅 发表于 2024-5-10 00:29
这个解包,再用pycdc反编译岂不是绝配
xiawan 发表于 2024-5-10 08:57
太谢谢老大的分享了。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-17 07:17

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表