Read file error: Error: EISDIR: illegal operation on a directory, read

微信小程序反编译遇到Read file error: Error: EISDIR: illegal operation on a directory, read怎么办?

这个其实就是反编译分包的时候用的bingo.bat文件,我们应该使用node wuWxapkg.js进行反编译。

node wuWxapkg.js -s=主包位置 分包

然后就可以将分包反编译出来了,之后把分包的内容复制到主包的文件夹中就可以了。

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
node wuWxapkg.js -s=chuanjiabing\wxc73957a752500ee8 chuanjiabing\wxc73957a752500ee1.wxapkg
Unpack file chuanjiabing\wxc73957a752500ee1.wxapkg...

Header info:
firstMark: 0xbe
unknownInfo: 0
infoListLength: 630
dataLength: 1546517
lastMark: 0xed

File list info:
fileCount: 13
Saving files...
Unpack done.
now dir: E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1
param of mainDir: chuanjiabing\wxc73957a752500ee8
sub package word dir: E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\indexPages
real mainDir: E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8
Split app-service.js and make up configs & wxss & wxml & wxs...
deal js ok
deal sub html ok
Decompile ./indexPages/home/index.wxml...
Decompile success!
Decompile ./indexPages/thread/comment/index.wxml...
Decompile success!
Decompile ./indexPages/thread/index.wxml...
Decompile success!
Decompile ./indexPages/thread/post/index.wxml...
Decompile success!
Decompile ./indexPages/thread/selectAt/index.wxml...
Decompile success!
Decompile ./indexPages/thread/selectPayment/index.wxml...
Decompile success!
Decompile ./indexPages/thread/selectProduct/index.wxml...
Decompile success!
Decompile ./indexPages/thread/selectRedpacket/index.wxml...
Decompile success!
Decompile ./indexPages/thread/selectReward/index.wxml...
Decompile success!
Decompile ./indexPages/thread/selectTopic/index.wxml...
Decompile success!
Decompile ./indexPages/thread/voteEditor/index.wxml...
Decompile success!
splitJs: E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\indexPages\app-service.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/common.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/home/index.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/thread/index.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/thread/comment/index.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/thread/post/index.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/thread/selectAt/index.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/thread/selectTopic/index.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/thread/selectProduct/index.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/thread/selectRedpacket/index.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/thread/selectReward/index.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/thread/selectPayment/index.js
E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8 indexPages/thread/voteEditor/index.js
Splitting "E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\indexPages\app-service.js" done.
Guess wxss(first turn)...
Regard E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8\indexPages\thread\selectProduct\index.wxss as pure import file.
Import count info: {"./indexPages/common.wxss":11}
Guess wxss(first turn) done.
Generate wxss(second turn)...
Generate wxss(second turn) done.
Save wxss...
saveDir: E:\work\study\littleprogram\chuanjiabing\wxc73957a752500ee1\chuanjiabing\wxc73957a752500ee8

微信小程序反编译

微信小程序反编译

需要使用到的工具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即可将小程序反编译出来。

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
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