Is it possible to get some information out of the .pyc file that is generated from a .py file?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Django __str__ returned non-string (type NoneType)
- Evil ctypes hack in python
I have no idea if it's any good, but a quick google search turned up decompyle.
Install using pip install pycompyle6
pycompyle6 filename.pyc
Decompyle++ (pycdc) was the only one that worked for me: https://github.com/zrax/pycdc
was suggested in Decompile Python 2.7 .pyc
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.
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.
Yes, you can get it with
unpyclib
that can be found on pypi.Than you can decompile your .pyc file