wxappUnpacker 微信小程序反编译 逆向 2019使用问题总结

wxappUnpacker 微信小程序反编译 逆向 2019使用问题总结

问题一:Cannot find module 'uglify-es'

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
问题二:$gwx is not defined

__vd_version_info__ is not defined

修改wxappUnpacker文件中的 wuWxss.js

function runVM(name, code) {
//let wxAppCode={},handle={cssFile:name};
//let vm=new VM({sandbox:Object.assign(new GwxCfg(),{__wxAppCode__:wxAppCode,setCssToHead:cssRebuild.bind(handle)})});
//vm.run(code);
//for(let name in wxAppCode)if(name.endsWith(".wxss")){
//handle.cssFile=path.resolve(frameName,"..",name);
//wxAppCode[name]();
//}

let wxAppCode = {};
let handle = {cssFile: name};
let gg = new GwxCfg();
let tsandbox = {
$gwx: GwxCfg.prototype["$gwx"],
__mainPageFrameReady__: GwxCfg.prototype["$gwx"], //解决 $gwx is not defined
__vd_version_info__: GwxCfg.prototype["$gwx"], //解决 __vd_version_info__ is not defined
__wxAppCode__: wxAppCode,
setCssToHead: cssRebuild.bind(handle)
}

let vm = new VM({sandbox: tsandbox});
vm.run(code);
for (let name in wxAppCode) {
if (name.endsWith(".wxss")) {
handle.cssFile = path.resolve(frameName, "..", name);
wxAppCode[name]();
}
}
}
完美反编译,可以开始愉快的借鉴与学习了

 

点赞 1
————————————————
版权声明:本文为CSDN博主「都市放猪」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wq57885/article/details/91082582

posted @ 2020-02-18 11:16  今天的诸葛亮  阅读(3133)  评论(0编辑  收藏  举报