The small program of reptiles one day excellent fresh msgin crackingOne

Applet crawler

First statement: This article is for learning purposes only, not for other purposes

I. Introduction

  反编译,其实还是简单的,要想拿到微信小程序源码,找到源文件在手机存放的位置就行,源文件拿到,用反编译脚本程序跑一下,微信小程序代码包里的所有文件、所有资源就出来了(除了project.config.json小程序配置文件)。

Mini programs are divided into main package and sub-package

2. Required tools

1. The nodejs operating environment, which is the operating environment required for the decompiled script.

2. Install the mobile phone simulator (used to download the WeChat applet package) and file manager
NetEase MuMu
3. RE file manager (search and install in the simulator or import it to the simulator for installation after automatic download) to find the source of the WeChat applet file

Insert picture description here

Next, we will start the work of decompilation.
3. Compilation process
1. Open the small program that needs to be decompiled and
open WeChat. If you don’t have one, download it in the app market. Open the WeChat small program you want to decompile. After the small program is opened, you can switch to The RE file manager went to find the source file.

   这里有一个机制,当点开一个微信小程序,如果本地这个文件夹下找到即将运行的小程序,会从微信服务器下载到本地,在以后的某个时刻又运行这个小程序,运行时,微信服务器会通知有没有小程序新版本,如有新版本,会在后台静默下载,小程序继续运行,新版本要到下一次运行才会启用,这就是微信小程序的更新机制。

2. Obtain the source file
Insert picture description here

   打开RE文件管理器,从根目录开始。/data/data/com.tencent.mm/MicroMsg/.../appbrand/pkg/,路径中有一段...,这里表示不确定具体一个,一般是很长的数字和字母组成的文件

3. Use the decompiled script to restore the code

Insert picture description here
Compilation is complete when the above situation occurs

4. Compilation is complete.
Check the folder after successful decompilation. Except for the configuration file project.config.json, there are other sources in the source code. After importing the project, you can see the effect. Some problems may occur during this period and need to be debugged. The following figure is a screenshot after successful compilation.
Insert picture description here

Guess you like

Origin blog.csdn.net/zyc__python/article/details/115001540