微信小程序反編譯


 教程僅供技術研究學習使用,若有侵權,聯系本人刪除

反編譯工具下載  鏈接: 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);
            }
        });
    },

到此微信小程序反編譯結束

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM