Decompile wx applet
1. Tool preparation
- Node.js official website address
- The official website address of the simulator (this article is Night God, to get the small program package)
- wxappUnpacker github address
2. Environmental installation
2-1. Node.js installation
- 1. Download node.js official website address
The official website is as follows:
click to download
Choose the installation package according to your own system
After the download is complete, right-click to display in the folder (similar to other browsers).
In the pop-up folder, find the just downloaded installation package and
double-click the installation package to start the installation. Just click next and the installation path defaults to C: Under \Program Files, you can also customize and modify
Node.js runtime
Represents the operating environmentnpm package manager
Represents the npm package manageronline documentation shortcuts
Online document shortcutAdd to PATH
Add to environment variables (it has been added to environment variables by default)
After the installation is complete, win+r opens the CMD window to execute the command. The node -v
version number appears as follows, indicating that the installation is successful
The latest version of node also installed npm during installation, execute npm -v to check the npm version, if it displays normally, the installation is successful
2-2. wxappUnpacker installation
- Download wxappUnpacker github address
git clone https://github.com/xuedingmiaojun/wxappUnpacker.git
After the download is complete
Use npm to install wxappUnpacker dependencies
npm install esprima
npm install css-tree
npm install cssbeautify
npm install vm2
npm install uglify-es
npm install js-beautify
2-3. Simulator installation
- Download the official website address of the night god simulator (this article is night god, you need to get the small program package)
Installation method reference: Baidu experience
3. Obtain the WX applet .wxapg file
Open the simulator, open the file assistant (similar to other simulators)
Open the Android folder
Select the root directory as shown
After selecting the root directory,
click on the path to find the pkg package
/data/data/com.tencent.mm/MicroMsg/<a bunch of codes>/appbrand/pkg/
I don’t know which applet you want, you can choose them all, check the small box in front
When opening the file assistant, switch to the location on the directory according to the directory on the file assistant /sdcard/Pictures
Click in the lower left corner and select Paste Selection
The file just now has been saved to the file, and then open the file assistant-open the computer folder, and then move the wxpkg file to your location
So far, all what you need is ready, and then you can decompile
4. Decompile wx applet
win + r to switch to immediately open the CMD wxappUnpacker directory
input node wuWxapkg.js ' 刚刚获取到的xxxx.wxapkg 路径+文件名和后缀 '
below
After completion, open the apkg folder, there will be an additional folder with the same name as wxapkg, inside is the decompiled file,
then you can use the wx applet assistant to open this folder, and you can proceed Own operation.
tips: Decompiling may not be able to compile completely, and some files may be lost or wrong.