Windows小程序反编译

2023/05/24 update

可以使用https://github.com/r3x5ur/unveilr一键反编译,编译命令,遇到问题可以看issue(开发者跑路了)备份https://github.com/D2550/A403.github.io/releases/download/tools/unveilr.zip

node scripts\pkg.js

1
2
3
4
5
ls release/
node scripts/pkg.js
yarn run build
yarn add --dev @rollup/plugin-json
sudo npm i -g corepack

以下为老文章


前言

Windows小程序是加密存储,没办法直接反编译(解包),需要先解密,然后再反编译,这篇文章主要介绍如何在Windows上不依赖手机和root来获取小程序的源码。

所需工具

过程记录

首先获取小程序包,如果你没修改过微信文件的存储位置,那么默认在C:Files。里面会有一堆wx开头的文件夹,有两种方法确认哪个是你要找的小程序所在的文件夹:一是根据时间来判断,二是把所有文件夹都删除,重新打开小程序生成的文件夹就是。

我这里的文件路径是D:Files9d6ad7b7a62a74a\862

使用第一个工具解密,不要把文件复制出来

解密成功的文件

安装Node.Js这里就不多说了,一路next基本就没问题。安装反编译的依赖:

1
2
3
4
5
6
		npm install esprima    
npm install css-tree
npm install cssbeautify
npm install vm2
npm install uglify-es
npm install js-beautify

反编译:

1
2
1.主包反编node wuWxapkg.js xxx     ## xxx为主包的路径## 
2.子包反编node wuWxapkg.js xxx1 -s= xxx2 ## xxx1为子包的文件路径,xxx2为反编主包生成的文件路径

参考链接


Windows小程序反编译
https://blog.njcit.me/2023/01/06/渗透记录/Windows小程序反编译/
作者
ccadmin
发布于
2023年1月6日
许可协议