V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
drymonfidelia
V2EX  ›  Python

使用 Nuitka 默认参数打包出来的 exe 仍可以正常输出带路径、行号的错误堆栈,是否说明可以反编译?为什么? Nuitka 存储了怎样的对应关系,是不是像 il2cpp 的 global-metadata 一样

  •  
  •   drymonfidelia · 15 天前 · 1151 次点击
    听说这个工作原理像 Unity 的 il2cpp 一样。il2cpp 会把源代码的很多信息存在 global-metadata 用于实现 C#的高级特性。Python 是否也一样需要类似的东西来实现高级特性?
    5 条回复    2025-02-27 23:05:59 +08:00
    louiswong2099
        1
    louiswong2099  
       15 天前
    Nuitka 在将 Python 脚本编译成二进制文件时,并没有完全去掉 Python 自身的一些属性。 只是将 Python 代码转换为 C 代码,再编译成机器码。
    Trim21
        2
    Trim21  
       15 天前 via Android
    你可以试试用 cython 把 py 编译成 c ,然后看看生成的 c 代码。
    R4rvZ6agNVWr56V0
        3
    R4rvZ6agNVWr56V0  
       15 天前
    如果你仔细看文档,你会发现付费就可以解决符号信息泄漏问题 https://nuitka.net/doc/commercial.html
    iorilu
        4
    iorilu  
       13 天前
    你在最外层的 main 入口函数包以一个 try-except 吃掉所有异常不就行了, 有任何问题直接 sys.exit 退出
    drymonfidelia
        5
    drymonfidelia  
    OP
       12 天前
    @iorilu 我知道怎么让报错不显示,想问的是这个显示原本堆栈的功能是怎么实现的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3053 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 14:16 · PVG 22:16 · LAX 07:16 · JFK 10:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.