From what I found, it seems the pycdc library is the best option currently, though there is also:
When I tried unpyc it threw and error for me, and uncomplye2 only works with 2.7.
Here are the steps to setup pycdc. These instructions are for Centos 5.3, so they may need to be tweaked for your system.
Install CMake
- I needed to do this because unpyc needs version 2.8+, but yum on Centos 5.3 installs 2.6.6 by default
- A full list of versions is here: http://www.cmake.org/cmake/resources/software.html
wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz
tar xzvf cmake-2.8.12.2.tar.gz
cd cmake-2.8.10.2
./bootstrap
make
make install
Download and compile pycdc
git clone git@github.com:zrax/pycdc.git
cd pycdc
/usr/local/bin/cmake ../pycdc/
make
Using pycdc to decompile
The program outputs to stdout, so redirect to a file.
./pycdc/pycdc filename.pyc > filename.py
That's it.
Hi! I had a lot of trouble trying to decompile .pyc file. Thanks to these instructions, finally I succeeded.
ReplyDeleteFor those of you who do not have time, I put the Python Decompyle++ online here:
http://www.javadecompilers.com/pyc
Thank you again, Turtle, and good luck!
Andrew CroCoder.
Cool article it's really. Friend on mine has long been awaiting just for this content. https://python.engineering/57113226-how-to-prevent-google-colab-from-disconnecting/
ReplyDelete