Source code acquisition for mini program reverse engineering

Background: Mini programs are used more and more. Many times, we need to use the research on mini programs in our work. Then a topic arises, how to reverse mini programs and how to obtain the source code. Today’s article will talk about how. Get the source code (PC version).

1. Load the mini program

1. Click to load the mini program on the PC (click on as many functions as possible to avoid incomplete source code)

 

2. Find the file that loads the mini program on the PC

 Settings--"File Management--"Get file path+Applet

 Yes, these are all the mini programs that have been loaded in your WeChat. It is difficult to tell which one is from the folder name, but you can find the folder with a similar time when you operate the target mini program from the time of the file, and click into the folder , find the file with the suffix wxapkg, which is the file we want.

2. The files obtained in the previous step are encrypted and cannot be used directly. Therefore, we need to decrypt the found files first, which requires a small tool. (There will be many on Baidu. If you can’t find it, you can leave a message for me)

 Simply click on the exe file and select the file found in the previous step to decrypt it. The decrypted file saving path will be displayed in the gadget.

2. Decompile the small program

1. Preparation

You also need to use a tool from a big guy, as shown below (you can download it on github, but you can’t find the message)

There will be a readme file in the folder, and the required dependencies and operation methods are clearly written. Make sure that your environment and dependencies are configured correctly before executing the code.

 

2. CTRL+R, then enter cmd, switch to the folder where the boss tool is located, and execute the following code

 3. Execute decompilation, view the results and save path

 The decompilation result will generate a folder with the same name under the tool's folder, which is the source code we want today that can be used for reverse engineering.

3. Edit the source code file and start the reverse operation

Use the WeChat developer tools to load the source code, and you can happily find what you want. However, one thing to be reminded is that decompiling a small program is not as simple as the article says, and there will be various minor problems (environment, dependencies, analysis). packages, etc.), everyone is welcome to explore together.

Guess you like

Origin blog.csdn.net/weixin_42575020/article/details/132214075