小程序反编译

你可以通过git clone将它存在本地

git clone https://github.com/qwerty472123/wxappUnpacker.git

然后进入该目录执行:

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

修改反编译脚本wuWxss.js代码

将原代码

function runOnce(){
        for(let name in runList)runVM(name,runList[name]);
  }

修改为

 function runOnce() {
        for (let name in runList) {
            // console.log(name, runList[name]);
            var start = `var window = window || {}; var __pageFrameStartTime__ = Date.now();    var __webviewId__;  var __wxAppCode__={};   var __mainPageFrameReady__ = function(){};  var __WXML_GLOBAL__={entrys:{},defines:{},modules:{},ops:[],wxs_nf_init:undefined,total_ops:0};     var __vd_version_info__=__vd_version_info__||{};     

            $gwx=function(path,global){
                if(typeof global === 'undefined') global={};if(typeof __WXML_GLOBAL__ === 'undefined') {__WXML_GLOBAL__={};
                }__WXML_GLOBAL__.modules = __WXML_GLOBAL__.modules || {};
            }`;
            runVM(name, start + " \r\n" + runList[name]);
        }
    }

小程序在根目录/data/data/com.tencent.mm/MicroMsg/{一坨十六进制}/appbrand/pkg/xxx.wxapkg

将目标xxx.wxapkg放到该目录, 然后执行如下命令:

node wuWxapkg.js xxx.wxapkg

顺利的话会生成一个同名的目录, 打开这个目录就能看到了

最后修改:2020 年 06 月 02 日 08 : 25 AM
如果觉得我的文章对你有用,请随意赞赏