微信小程序反编译
datehoer 4/27/2022 nodejs反编译小程序
微信小程序反编译
需要使用到的工具wxappUnpacker,node.js
其中wxappUnpacker关注公众号Kisger的工作台,并回复wxappUnpacker即可获取下载地址。
首先将wxappUnpacker(以下简称wx)解压缩,然后输入npm install将对应的node.js模块下载下来。
之后我们需要利用到的是wuWxapkg.js这个文件,当然也可以使用bingo.bat。
然后我们打开
C:Users用户名DocumentsWeChat FilesApplet,找到小程序的包。
然后将他复制到wx的文件夹中,输入node wuWxapkg.js xxxx.wxapkg即可将小程序反编译出来。
E:\work\study\littleprogram>bingo.bat chuanjiabing\wxc73957a752500ee8.wxapkg
E:\work\study\littleprogram># WXAPPUNPACKER_PATH 项目路径
'#' is not recognized as an internal or external command,
operable program or batch file.
E:\work\study\littleprogram>set WXAPPUNPACKER_PATH=E:\work\study\littleprogram\
E:\work\study\littleprogram>set FILE_FORMAT=wxapkg
E:\work\study\littleprogram>echo "node E:\work\study\littleprogram\/wuWxapkg.js "
"node E:\work\study\littleprogram\/wuWxapkg.js "
E:\work\study\littleprogram>node E:\work\study\littleprogram\/wuWxapkg.js chuanjiabing\wxc73957a752500ee8.wxapkg
Unpack file chuanjiabing\wxc73957a752500ee8.wxapkg...
Header info:
firstMark: 0xbe
unknownInfo: 0
infoListLength: 734
dataLength: 2313578
lastMark: 0xed
File list info:
fileCount: 19
Saving files...
Unpack done.
Split app-service.js and make up configs & wxss & wxml & wxs...
deal config ok
deal js ok
deal wxss.js ok
deal css ok
=======================================================
这个小程序采用了分包
子包个数为: 4
=======================================================
Decompile ./base.wxml...
Decompile success!
Decompile ./comp.wxml...
Decompile success!
Decompile ./custom-wrapper.wxml...
Decompile success!
Decompile ./pages/index/index.wxml...
Decompile success!
splitJs: E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8\app-service.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8 common.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8 discuzq.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8 runtime.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8 taro.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8 vendors.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8 app.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8 comp.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8 custom-wrapper.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8 pages/index/index.js
Splitting "E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8\app-service.js" done.
Guess wxss(first turn)...
Import count info: {}
Guess wxss(first turn) done.
Generate wxss(second turn)...
Generate wxss(second turn) done.
Save wxss...
saveDir: E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee8
Split and make up done.
Delete files...
Deleted.
File done.
Total use: 6.399s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68