微信小程序反编译
教程仅供技术研究学习使用,若有侵权,联系本人删除
反编译工具下载 链接: https://pan.baidu.com/s/127mOK7alPD73mk0JZwLcyQ 密码: dwhe
解压 unzip wxappUnpacker.zip
安装依赖:
npm install esprima -g
npm install css-tree -g
npm install cssbeautify -g
npm install vm2 -g
npm install uglify-es -g
npm install js-beautify -g
npm install escodegen -g
安装夜神模拟器
安装微信 扣扣(扣扣用来把模拟器里的小程序包发送到电脑上)
打开微信,查找要使用的小程序并打开
使用自带amaze软件找到微信
然后找到微信里小程序包文件
找到包文件更改权限并通过 qq发送到电脑
不修改权限将发送失败
电脑下载微信小程序包 然后使用最初安装的反编译工具包进行 反编译
中间报错暂时不用理会
去反编译后的目录查看文件
🐳 [_844561035_106] ll 11:53:22 total 3008 -rw-r--r-- 1 an staff 103K 8 17 11:51 app-config.json -rw-r--r-- 1 an staff 623K 8 17 11:51 app-service.js -rw-r--r-- 1 an staff 739K 8 17 11:51 app-wxss.js -rw-r--r-- 1 an staff 12K 8 17 11:51 app.js drwxr-xr-x 14 an staff 448B 8 12 17:49 components drwxr-xr-x 13 an staff 416B 8 12 17:49 images drwxr-xr-x 20 an staff 640B 8 12 17:50 page -rw-r--r-- 1 an staff 42B 8 17 11:51 page-frame.js drwxr-xr-x 8 an staff 256B 8 12 17:50 template -rw-r--r-- 1 an staff 19K 8 17 09:44 test.js drwxr-xr-x 14 an staff 448B 8 12 17:50 utils 🐳 [_844561035_106]
大多数文件已经反编译出来了,查看并分析代码
🐳 [_844561035_106] head -n 200 app.js 11:54:29 var a = require("/utils/utils"); require("./utils/ald-stat/sdk/ald-stat.js"); App({ onLaunch: function(t) { try { t && t.query && t.query._sharesource ? a.setStorageSync("_sharesource", "app") : wx.getStorageSync("_sharesource") && wx.removeStorageSync("_sharesource"); } catch (t) {} }, onShow: function(a) { var t = this; a && (1036 == a.scene || 1069 == a.scene ? this.globalData.appLaunchShow = !0 : 1089 == a.scene || 1090 == a.scene || (this.globalData.appLaunchShow = !1), a.shareTicket && wx.getShareInfo({ shareTicket: a.shareTicket, success: function(a) { t.globalData.shareInfo = a; } })); }, request: function(t) { var e = this; wx.request({ url: t.url, data: t.data, method: t.method, header: t.header || { "content-type": "application/json" }, success: function(o) { o && 404 === o.statusCode || (40101 === o.data.status ? e.setLastedLoginInfo(0).then(function() { try { wx.setStorageSync("logOut", !0); } catch (t) { try { wx.setStorage({ key: "logOut", data: !0 }); } catch (t) { a.toast("系统异常"); } } e.clearBackUrl(), e.clearToken(), wx.removeStorageSync("refreshToken"), a.toast("该账号已在别的手机上登录"), wx.reLaunch({ url: "/page/home/home-tab/home-tab" }); }) : t.success && t.success(o)); }, fail: function(e) { t.fail && t.fail(e), e && e.errMsg && "request:fail timeout" === e.errMsg ? a.toast("请求超时") : a.toast("小查开了个小差,请刷新重试"); }, complete: function(a) { t.complete && t.complete(a); } }); },
到此微信小程序反编译结束