【英文】反编译 exe 文件
Preface
Decompiling .exe
files into .py
files.
Clone pyinstxtractor
1 | git clone https://github.com/countercept/python-exe-unpacker.git |
Convert exe file to pyc file
<file_name>
: file name
1 | cd python-exe-unpacker |
Add magic and timestamp
Add a 4-byte
magic
and a 4-bytetimestamp
to the header of thelockyfud.pyc
file.Copy 4 bytes from the header of the
struct
file as themagic
of thelockyfud.pyc
file.Set the 4-byte timestamp as
00 00 00 00
.
Convert pyc file to py file
Install uncompyle6
1 | pip install uncompyle6 |
Convert pyc file to py file
1 | uncompyle6 <file_name>.pyc > lock.py |