如何从 Python 3.10 反编译 .pyc 文件?
我确实尝试了 uncompyle6
、decompyle3
等,但它们都不适用于 Python 3.10。
现在是否有可能做到这一点?
I did try uncompyle6
, decompyle3
, and others, but none of them worked with Python 3.10.
Is it even possible to do this right now?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
使用pycdc。
Github:https://github.com/zrax/pycdc
Use pycdc.
Github: https://github.com/zrax/pycdc
在 Windows 上(假设您有 Cmake 和 MSBuild.exe)
on Windows (presume you have both Cmake and MSBuild.exe)
请尝试https://pylingual.io,它支持最新的Python版本(3.6 ~ 3.12)。该服务实现了一个开放服务,运行基于NLP的翻译模型+控制流分析。
Please try https://pylingual.io, which supports the latest Python versions (3.6 ~ 3.12). The service implements an open service that runs an NLP-based translation model + control flow analysis.
如果我们使用 ubuntu,打开终端:
然后告诉终端 python *.pyc 脚本在哪里:
您将看到结果
If we use ubuntu, open the Terminal:
Then tell the terminal where that python *.pyc script is:
You will see the result
随着时间的推移和更多的 Python 版本的出现,它似乎变得越来越不可靠。从安全角度来看,反编译是不可取的,并且期望 Python 开发人员将继续尝试阻止。最后我尝试给出了部分结果,但缺少代码(windows/cmake/msbuild 方法 w/v3.10)。我还没有尝试过 pylingual.io 选项。它需要将您的代码提交到他们的云服务。
It seems to get less reliable with time and additional Python releases. Decompiling is undesirable from a security standpoint, and expect Python devs will continue to try to prevent. Last I tried gave partial results with code missing (windows/cmake/msbuild method w/v3.10). I have not tried the pylingual.io option. It requires submitting your code up to their cloud service.