-
需要把打包得文件解压,下载 pyinstxtractor.py 文件,执行
python pyinstxtractor.py send_upgrade_data.exe
,把 send_upgrade_data.exe 解压得到 send_upgrade_data.exe_extracted 文件夹
-
获取 pyc 文件 , 从解压出得目录(send_upgrade_data.exe_extracted)下获取 struct 与 send_upgrade_data 文件,执行
python get_pyc.py
。需要 struct 中得一个头文件信息
get_pyc.py 文件
structPath = 'struct' programPath = 'send_upgrade_data' with open(structPath, 'rb') as f: #打开struct文件 head_data=f.read(16) with open(programPath, 'rb') as f: #打开待反编文件 program_data=f.read() with open(programPath+'.pyc', 'wb') as f: #创建pyc待反编文件 f.write(head_data+program_data) #把加入的字节和原来的字节合并写入文件 print('over.')
-
获取 py 文件
安装
pip install uncompyle6
执行
uncompyle6.exe send_upgrade_data.pyc > send_upgrade_data.py
把 pyinstaller 打包成得 exe 还原为 py 文件
最新推荐文章于 2024-04-22 13:57:16 发布