Decompile wx applet

Decompile wx applet

1. Tool preparation

2. Environmental installation

2-1. Node.js installation

The official website is as follows:

Insert picture description here
click to download

Insert picture description here
Choose the installation package according to your own system

Insert picture description here
After the download is complete, right-click to display in the folder (similar to other browsers).
Insert picture description here
In the pop-up folder, find the just downloaded installation package and
Insert picture description here
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 modifyInsert picture description here

Insert picture description here

  • Node.js runtime Represents the operating environment
  • npm package manager Represents the npm package manager
  • online documentation shortcuts Online document shortcut
  • Add 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 -vversion number appears as follows, indicating that the installation is successful

Insert picture description here
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
Insert picture description here

2-2. wxappUnpacker installation

git clone https://github.com/xuedingmiaojun/wxappUnpacker.git

After the download is complete
Insert picture description here

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

Installation method reference: Baidu experience

3. Obtain the WX applet .wxapg file

Open the simulator, open the file assistant (similar to other simulators)
Insert picture description here

Open the Android folder
Insert picture description here

Select the root directory as shown
Insert picture description here
Insert picture description here

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/

Insert picture description here

I don’t know which applet you want, you can choose them all, check the small box in front
Insert picture description here

When opening the file assistant, switch to the location on the directory according to the directory on the file assistant /sdcard/Pictures
Insert picture description here

Click in the lower left corner and select Paste Selection
Insert picture description here

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
Insert picture description here

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
Insert picture description here

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.

Guess you like

Origin blog.csdn.net/weixin_45550881/article/details/106467570