解压并反编译 python 打包的 exe 文件

1,下载 pyinstxtractor.py,将 exe 文件解压转换成 pyc 文件

https://github.com/extremecoders-re/pyinstxtractor 下载 pyinstxtractor.py 到任意目录

然后执行 python pyinstxtractor.py test.exe 解压 exe 得到编译后的 python。

注意: 你需要使用和打包 exe 时一样的 python 版本,否则可能会出现类似如下提示,某些资源无法解压

1
2
3
[!] Warning: This script is running in a different Python version than the one used to build the executable. 
[!] Please run this script in Python 3.7 to prevent extraction errors during unmarshalling
[!] Skipping pyz extraction

2,使用 pycdc 将 pyc 反编译成 py 文件

克隆 pycdc 仓库

1
2
3
4
5
git clone https://github.com/zrax/pycdc.git
cd pycdc
mkdir build && cd build
cmake ..
make

反编译 .pyc 文件

1
./pycdc 1client.pyc > client.py

另见 https://crackmes.cn/doc/157/

无需登录下载 oracle jdk

adobe 提供的下载: https://helpx.adobe.com/coldfusion/kb/coldfusion-downloads.html#downloads3

主要是 oracle jdk 执行 java -version 输出的是 java version xx.xx.xx, 而其他 openjdk 输出的是 openjdk version xx.xx.xx , 而 MTN 工具要求输出的是 java version, 且仅支持 1.8、1.9 版本

Windows 下 android usb 驱动

  1. 各个 OEM 厂商的驱动: https://developer.android.google.cn/studio/run/oem-usb?hl=zh-cn#Drivers

  2. Google USB 驱动: https://developer.android.google.cn/studio/run/win-usb?hl=zh-cn

Android Studio 旧版本下载

https://developer.android.com/studio/archive 注意一定要把语言切换为 English,中文页面下会出现【抱歉,找不到该页面错误】

腾讯 Android SDK 镜像

https://mirrors.cloud.tencent.com/AndroidSDK/

perfetto 分析 Native 内存泄漏

  1. https://github.com/google/perfetto/tree/main/tools 下载 heap_profile , 保存为 heap_profile.py

  2. 使用 python3 heap_profile.py -o empty_dir, 其中 empty_dir 是一个空目录的路径。记住一定是一个空目录。另外还可以设置其他一些参数,直接看 heap_profile.py 里的代码即可