Is it possible to decompile a compiled .pyc file i

2019-01-03 04:18发布

Is it possible to get some information out of the .pyc file that is generated from a .py file?

7条回答
ら.Afraid
2楼-- · 2019-01-03 04:54

I have no idea if it's any good, but a quick google search turned up decompyle.

查看更多
我命由我不由天
3楼-- · 2019-01-03 04:56

Install using pip install pycompyle6

pycompyle6 filename.pyc

查看更多
唯我独甜
4楼-- · 2019-01-03 04:58

Decompyle++ (pycdc) was the only one that worked for me: https://github.com/zrax/pycdc

was suggested in Decompile Python 2.7 .pyc

查看更多
霸刀☆藐视天下
5楼-- · 2019-01-03 04:59

You may try Easy Python Decompiler. It's based on Decompyle++ and Uncompyle2. It's supports decompiling python versions 1.0-3.3

Note: I am the author of the above tool.

查看更多
仙女界的扛把子
6楼-- · 2019-01-03 05:05

Uncompyle6 works for Python 3 and 2.7 - recommended option as it's most recent tool, aiming to unify earlier forks and focusing on automated testing.

Uncompyle2 supports Python 2.7 only. This worked well for me some time ago to decompile the .pyc bytecode into .py, whereas unpyclib crashed with an exception.

查看更多
神经病院院长
7楼-- · 2019-01-03 05:05

Yes, you can get it with unpyclib that can be found on pypi.

$ pip install unpyclib

Than you can decompile your .pyc file

$ python -m unpyclib.application -Dq path/to/file.pyc
查看更多
登录 后发表回答