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
ilililili
V2EX  ›  Python

已知源码,但我想知道这个 pyc 是怎么编译出来的,反编译失败

  •  
  •   ilililili · 2016-01-09 14:25:26 +08:00 · 3717 次点击
    这是一个创建于 3034 天前的主题,其中的信息可能已经有所发展或是发生改变。
    叫 Pympler-0.3.0 ,别人项目中用到了这个,我看到的是一堆 pyc ,尝试用现成的反编译工具都失败了
    pyc: http://share.weiyun.com/7a83ea42ec04704b90cced900657affe
    py: https://pypi.python.org/pypi/Pympler/0.3.0
    4 条回复    2016-01-09 21:16:57 +08:00
    pathletboy
        1
    pathletboy  
       2016-01-09 15:30:32 +08:00   ❤️ 1
    python
    >>> import compileall
    >>> compileall.compile_dir(r'pympler')
    ilililili
        2
    ilililili  
    OP
       2016-01-09 20:07:51 +08:00
    @pathletboy 不是哦,你误解成怎么编译成正常的 pyc 文件了。我上传的 pyc 貌似是加密过的,我想知道通过源码是怎么编译出这种难以反编译的 pyc 文件。
    pathletboy
        3
    pathletboy  
       2016-01-09 20:44:41 +08:00
    @ilililili 你试试 py3
    ilililili
        4
    ilililili  
    OP
       2016-01-09 21:16:57 +08:00
    @pathletboy 看 magic number 是 03 F3 0D 0A ,是 Python2 编译的 =。=
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1035 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 23:42 · PVG 07:42 · LAX 16:42 · JFK 19:42
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.