syssec-utd/pylingual

GitHub: syssec-utd/pylingual

PyLingual 是一个支持 Python 3.6+ 的 CPython 字节码反编译器,利用机器学习模型将 .pyc 文件还原为可读的 Python 源代码。

Stars: 1283 | Forks: 174

# PyLingual - 适用于 3.6+ 的 Python 反编译器 PyLingual 是一个 CPython bytecode 反编译器,支持自 3.6 以来的所有已发布 Python 版本。有关 PyLingual 的设计和实现信息,请参阅我们的[研究论文](https://www.computer.org/csdl/proceedings-article/sp/2025/223600a052/21B7QZB86cg)。 PyLingual 可以通过我们的[网络服务](https://pylingual.io)运行,也可以在本地运行。 此代码库针对可读性和未来的扩展进行了优化,因此与网络服务上托管的版本相比,初期可能存在一些控制流准确性的下降。 ## 环境要求 - `uv` Python 包管理器([安装](https://docs.astral.sh/uv/getting-started/installation/)),用于项目依赖项和托管的 Python 版本。 ### 反编译已停止维护的 Python 版本 为了验证反编译的正确性并生成模型训练集,PyLingual 需要能够使用目标版本编译 Python。 对于当前的 Python 版本 (3.8-3.14),PyLingual 使用 `uv` 的托管安装,但对于 Python 3.6 和 3.7,PyLingual 使用 [pyenv](https://github.com/pyenv/pyenv)(Windows 下使用 [pyenv-win](https://github.com/pyenv-win/pyenv-win))。 ## 设置 使用 [uv](https://docs.astral.sh/uv/) 从源码安装: ``` git clone https://github.com/syssec-utd/pylingual uv tool install ./pylingual ``` ## 用法 ``` Usage: pylingual [OPTIONS] [FILES]... End to end pipeline to decompile Python bytecode into source code. Options: -o, --out-dir PATH The directory to export results to. -c, --config-file PATH Config file for model information. -v, --version VERSION Python version of the .pyc, default is auto detection. -k, --top-k INT Maximum number of additional segmentations to consider. -q, --quiet Suppress console output. --trust-lnotab Use the lnotab for segmentation instead of the segmentation model. --init-pyenv Install pyenv before decompiling. -h, --help Show this message and exit. ``` ## 演示 ![演示 gif](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/0b2950e430193528.gif) ## 支持 如果您在安装和使用 PyLingual 时遇到任何问题,请创建 issue 或通过我们的支持邮箱 pylingual.io@gmail.com 发送消息。
标签:Python, SOC Prime, URL提取, 云资产清单, 反编译, 字节码, 开发工具, 无后门, 逆向工具, 逆向工程