Reputation: 91
I did try uncompyle6
, decompyle3
, and others, but none of them worked with Python 3.10.
Is it even possible to do this right now?
Upvotes: 8
Views: 51309
Reputation: 191
If we use ubuntu, open the Terminal:
sudo snap install pycdc #this helps to avoid the error: Command 'pycdc' not found when following MDKawsar's answer
Then tell the terminal where that python *.pyc script is:
pycdc /home/jbsidis/Downloads/scripts/assets/main.pyc
You will see the result
Upvotes: 1
Reputation: 9
It seems to get less reliable with time and additional Python releases. Decompiling is undesirable from a security standpoint, and expect Python devs will continue to try to prevent. Last I tried gave partial results with code missing (windows/cmake/msbuild method w/v3.10). I have not tried the pylingual.io option. It requires submitting your code up to their cloud service.
Upvotes: 0
Reputation: 427
Please try https://pylingual.io, which supports the latest Python versions (3.6 ~ 3.12). The service implements an open service that runs an NLP-based translation model + control flow analysis.
Upvotes: 3
Reputation: 437
Use pycdc. Github: https://github.com/zrax/pycdc
git clone https://github.com/zrax/pycdc
cd pycdc
cmake .
make
make check
pycdc C:\Users\Bobby\example.pyc
Upvotes: 21
Reputation: 49
on Windows (presume you have both Cmake and MSBuild.exe)
git clone https://github.com/zrax/pycdc
cd pycdc
cmake .
MSBuild.exe pycdc.vcxproj
cd pycdc/Debug
pycdc.exe yourfile.pyc
Upvotes: 3