将python打包的.exe文件还原成.py文件
1、下载 pyinstxtractor.py
地址:https://sourceforge.net/projects/pyinstallerextractor/
2、把pyinstxtractor.py和exe文件放在同个目录下
打开cmd,进入该目录,输入:
python2 pyinstxtractor.py xx.exe
运行后生成xx.exe_extracted文件夹。
3、用uncompyle2来对pyc文件进行反编译。
1、安装uncompyle2
在windows上安装前你需要已经安装python2.7(uncompyle2是基于python2.7的)
点击右上角的Download ZIP,下载后假设解压至
d:\
打开cmd,进入
d:\uncompyle2-master
,输入:python2 setup.py install
2、反编译
将a.pyc文件复制到
d:\uncompyle2-master\scripts
cmd中进入
d:\uncompyle2-master\scripts
,输入:python2 -u uncompyle2 a.pyc > a.py
a.py已经出现在
d:\uncompyle2-master\scripts