太恶心了,直接反编译一下再修改得了

本文是全系列中第12 / 23篇:python学习记

DY步,把exe的程序变异成pyc

 

D:\Downloads\python-exe-unpacker-master>python pyinstxtractor.py 02-上传阿里云oss.exe    acted
D:\Downloads\python-exe-unpacker-master\pyinstxtractor.py:95: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
  import imp
[*] Processing 02-上传阿里云oss.exe
[*] Pyinstaller version: 2.1+
[*] Python version: 37
[*] Length of package: 14934525 bytes
[*] Found 127 files in CArchive
[*] Beginning extraction...please standby
[!] Warning: The script is running in a different python version than the one used to build the executable
    Run this script in Python37 to prevent extraction errors(if any) during unmarshalling
[*] Found 812 files in PYZ archive
[*] Successfully extracted pyinstaller archive: 02-上传阿里云oss.exe

You can now use a python decompiler on the pyc files within the extracted directory

D:\Downloads\python-exe-unpacker-master>

 

第二部,吧解压的数据包里面程序添加一个文件头

添加一个文件头,直接找一个PYC文件吧DY行的16进制复制添加到这个没有后缀的文件上就行了

然后在吧这个文件修改成pyc结尾的

得到:上传阿里云oss.pyc

第三步,使用uncompyle6 吧这个pyc结尾的文件反编译成py文件就行了

操作:

 

>uncompyle6 -o . 上传阿里云oss.pyc     fest
上传阿里云oss.pyc --
# Successfully decompiled file

关于华哥

华哥说网络运营 纪录自媒体,网络推广,外贸推广的点点滴滴
此条目发表在随笔记分类目录。将固定链接加入收藏夹。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注