推荐学习书目
› 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 · Feb 25, 2025 · 2684 views
    This topic created in 577 days ago, the information mentioned may be changed or developed.
    听说这个工作原理像 Unity 的 il2cpp 一样。il2cpp 会把源代码的很多信息存在 global-metadata 用于实现 C#的高级特性。Python 是否也一样需要类似的东西来实现高级特性?
    5 replies  •  2025-02-27 23:05:59 +08:00
    louiswong2099
        1
    louiswong2099  
       Feb 25, 2025
    Nuitka 在将 Python 脚本编译成二进制文件时,并没有完全去掉 Python 自身的一些属性。 只是将 Python 代码转换为 C 代码,再编译成机器码。
    Trim21
        2
    Trim21  
       Feb 25, 2025 via Android
    你可以试试用 cython 把 py 编译成 c ,然后看看生成的 c 代码。
    R4rvZ6agNVWr56V0
        3
    R4rvZ6agNVWr56V0  
       Feb 25, 2025
    如果你仔细看文档,你会发现付费就可以解决符号信息泄漏问题 https://nuitka.net/doc/commercial.html
    iorilu
        4
    iorilu  
       Feb 27, 2025
    你在最外层的 main 入口函数包以一个 try-except 吃掉所有异常不就行了, 有任何问题直接 sys.exit 退出
    drymonfidelia
        5
    drymonfidelia  
    OP
       Feb 27, 2025
    @iorilu 我知道怎么让报错不显示,想问的是这个显示原本堆栈的功能是怎么实现的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2384 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 05:53 · PVG 13:53 · LAX 22:53 · JFK 01:53
    ♥ Do have faith in what you're doing.