微信小程序反编译小红书

1.安装nodejs

npm install uglify-es --save

npm install esprima --save

npm install css-tree --save

npm install cssbeautify --save

npm install vm2 --save

npm install uglify-es --save

npm install js-beautify --save

npm install escodegen --save

npm install cheerio --save

2.安装逍遥模拟器

3.模拟器安装微信和re文件管理器

4.进入/data/data/com.tencent.mm/MicroMsg/362960477dfbc42252eef5940cee20f5/appbran
d/pkg

5.adb链接模拟器 

adb connect 127.0.0.1:21503

拉取小程序包

adb pull /data/data/com.tencent.mm/MicroMsg/362960477dfbc42252eef5940cee20f5/appbran
d/pkg D:\pkg

6.将小程序的.wxapkg文件下载到本地电脑,根据时间可以看出那个pkg是你要用到的

 

 

 7.反编译

npm install
npm install esprima
    
npm install css-tree
    
npm install cssbeautify
    
npm install vm2
    
npm install uglify-es
    
npm install js-beautify

node .\wuWxapkg.js -s=D:\software\apk\xcx\pkg\_1264098102_573

碰到的问题总结:

1.开始用的是微信pc上面的wxapkg但是用wuWxapkg 反编译直接报Magic number is not correct 查了资料魔数不正确,请确认包是否是通过手机模拟器获取的,电脑端或其它途径的包暂不支持。

2.反编译小红书后报错SyntaxError: Illegal return statement 按照https://zhuanlan.zhihu.com/p/136886986还是没有解决,但是不影响查看代码,后续在研究下

 

 

 

posted @ 2021-09-23 17:53  爱洗澡的猫妹  阅读(902)  评论(0编辑  收藏  举报