How to decomplied pyc to py ?

How to decomplied pyc to py ?

phantri.bl
Contributor Contributor
3,192 Views
7 Replies
Message 1 of 8

How to decomplied pyc to py ?

phantri.bl
Contributor
Contributor

Hello everyone.

How to decomplied pyc to py to read code ?

I used this sofware but it's not working.

Can you guide me ?

 

phantribl_1-1636552156390.png

Thank you.

 

 

0 Likes
Accepted solutions (1)
3,193 Views
7 Replies
Replies (7)
Message 2 of 8

George.Endrulat
Advisor
Advisor

We use uncompyle6.exe

 

Essentially:

C:\>C:\Users\Username\AppData\Local\Programs\Python\Python38\Scripts\uncompyle6.exe -ro c:\Path\supportssub c:\Path\supportssub

 

If you change the Username, Path to reflect your setup that'll decompile supportssub/*.pyc to .py

 

Uncompyle6 convert pyc to py file python 3 (Whole directory) - Stack Overflow

 

 

George

If my post offers a solution, please click "Accept as Solution"
Message 3 of 8

h_eger
Mentor
Mentor

Dear @phantri.bl ,

click on "Decompile a Direct ..."

11-11-_2021_07-40-12.jpg
select your directory

11-11-_2021_07-41-49.jpg
and drink coffee it can take a little longer depending on the number of * .pyc files

-

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).

Hartmut Eger
Senior Engineer
Anlagenplanung + Elektotechnik
XING | LinkedIn

EESignature



Message 4 of 8

phantri.bl
Contributor
Contributor

It is not working sir. It have a error : Magic value mismatch! 

phantribl_0-1636635871059.png

 

0 Likes
Message 5 of 8

phantri.bl
Contributor
Contributor

Sorry sir.

How to install uncompyle6.exe ?

How to use uncompyle6 ?

Can you make a video tutorial about install and use uncompyle6 ?

and give me a link to watch for more clearly.

 

Thanks sir, I'am try to learn.

0 Likes
Message 6 of 8

George.Endrulat
Advisor
Advisor

Go get the master branch from GitHub - rocky/python-uncompyle6: A cross-version Python bytecode decompiler

 

after you've installed python...

In the extracted zip directory

$ pip install -e .  # set up to run from source tree
                    # Or if you want to install instead
$ python setup.py install 

 I've already shown in the previous post how to use it.  There's also a built in help.

George

If my post offers a solution, please click "Accept as Solution"
Message 7 of 8

李榕华|Ronghua.LI
Advisor
Advisor
Accepted solution

You can try this website.

https://tool.lu/pyc/ 


李榕华

13489140049@qq.com




Message 8 of 8

phantri.bl
Contributor
Contributor

Thanks Sir. I can decomplied easily.