将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\scriptscmd中进入
d:\uncompyle2-master\scripts,输入:python2 -u uncompyle2 a.pyc > a.pya.py已经出现在
d:\uncompyle2-master\scripts
本文介绍如何使用pyinstxtractor.py从Python打包的.exe文件中提取原始资源,并利用uncompyle2对生成的.pyc文件进行反编译,最终还原为.py源代码。
6084

被折叠的 条评论
为什么被折叠?



