• 欢迎访问晓墨博客,晓墨博客专注于电脑技术知识及资源分享! QQ群

PC微信小程序包解密工具C#版无需root或模拟器

网站维护 墨墨 10个月前 (12-30) 201次浏览 0个评论 扫描二维码

提示:鉴于有网友回复不知道干什么用的,因此有必要重新修改一次,写上完整的使用说明,说白了就是获取线上小程序源码的辅助工具,电脑端访问微信小程序会在C:\Users\用户\Documents\WeChat Files\Applet(即【我的文档 】下寻找WeChat Files 目录)目录以wx开头生成小程序包,不过是加密的,因此我们用此程序解密,配合小程序解包工具获取源码,比如wuWxapkg.js获取小程序源码。
一般的小程序反编译教程就是手机root然后在XXX目录下寻找wxapkg包,或者安装模拟器然后在寻找,其实可以更简单:登录电脑端微信,访问你想解包的小程序,小程序包会在:我的文档\WeChat Files\Applet下生成wx开头的文件夹,里面包含__APP__.wxapkg文件,这个文件就是小程序包(不要复制出来)。

PC端微信把wxapkg给加密,加密后的文件的起始为V1MMWX。
加密方法为:

  •     首先pbkdf2生成AES的key。利用微信小程序id字符串为pass,salt为saltiest 迭代次数为1000。调用pbkdf2生成一个32位的key
  •     取原始的wxapkg的包得前1023个字节通过AES通过1生成的key和iv(the iv: 16 bytes),进行加密
  •     接着利用微信小程序id字符串的倒数第2个字符为xor key,依次异或1023字节后的所有数据,如果微信小程序id小于2位,则xorkey 为 0x66
  •     把AES加密后的数据(1024字节)和xor后的数据一起写入文件,并在文件头部添加V1MMWX标识

一 准备工具
1 node.js 运行环境
下载地址:https://nodejs.org/en/
2 反编译的脚本
https://github.com/xuedingmiaojun/wxappUnpacker
3 小程序包解密工具【C#版原创】
https://share.weiyun.com/uMqNGOXv
二 开始反编译
1 获取小程序pkg包:
登录电脑端微信,访问你想解包的小程序,小程序包会在:我的文档\WeChat Files\Applet下生成wx开头的文件夹,里面包含__APP__.wxapkg文件,这个文件就是小程序包(不要复制出来)。
我们用解密工具解密:

 

 

下载地址:https://share.weiyun.com/uMqNGOXv

核心代码移步:https://www.52pojie.cn/thread-1336342-1-1.html

解密后的小程序包就在程序的 wxpack目录下以小程序ID命名。

2 安装脚本依赖
利用cmd cd到你刚刚下载下来的脚本目录下,执行npm install安装依赖

3 执行脚本命令
复制小程序pkg的路径执行bingo.bat d:\wxpack\wx1e4eb0f8a10e5177.wxapkg

三 反编译成功

<span class="typ">Decompile</span> <span class="pun">./</span><span class="pln">pages</span><span class="pun">/</span><span class="pln">admin</span><span class="pun">/</span><span class="pln">admin</span><span class="pun">.</span><span class="pln">wxml</span><span class="pun">...</span>
<span class="typ">Decompile</span><span class="pln"> success</span><span class="pun">!</span>
<span class="typ">Decompile</span> <span class="pun">./</span><span class="pln">pages</span><span class="pun">/</span><span class="pln">admin</span><span class="pun">/</span><span class="pln">help</span><span class="pun">.</span><span class="pln">wxml</span><span class="pun">...</span>
<span class="typ">Decompile</span><span class="pln"> success</span><span class="pun">!</span>
<span class="typ">Decompile</span> <span class="pun">./</span><span class="pln">pages</span><span class="pun">/</span><span class="pln">admin</span><span class="pun">/</span><span class="pln">user</span><span class="pun">.</span><span class="pln">wxml</span><span class="pun">...</span>
<span class="typ">Decompile</span><span class="pln"> success</span><span class="pun">!</span>
<span class="typ">Decompile</span> <span class="pun">./</span><span class="pln">pages</span><span class="pun">/</span><span class="pln">index</span><span class="pun">/</span><span class="pln">index</span><span class="pun">.</span><span class="pln">wxml</span><span class="pun">...</span>
<span class="typ">Decompile</span><span class="pln"> success</span><span class="pun">!</span>
<span class="typ">Decompile</span> <span class="pun">./</span><span class="pln">pages</span><span class="pun">/</span><span class="pln">login</span><span class="pun">/</span><span class="pln">login</span><span class="pun">.</span><span class="pln">wxml</span><span class="pun">...</span>
<span class="typ">Decompile</span><span class="pln"> success</span><span class="pun">!</span>
<span class="typ">Decompile</span> <span class="pun">./</span><span class="pln">pages</span><span class="pun">/</span><span class="pln">report</span><span class="pun">/</span><span class="pln">index</span><span class="pun">.</span><span class="pln">wxml</span><span class="pun">...</span>
<span class="typ">Decompile</span><span class="pln"> success</span><span class="pun">!</span>
<span class="typ">Guess</span><span class="pln"> wxss</span><span class="pun">(</span><span class="pln">first turn</span><span class="pun">)...</span>
<span class="typ">Import</span><span class="pln"> count info</span><span class="pun">:</span> <span class="pun">{}</span>
<span class="typ">Guess</span><span class="pln"> wxss</span><span class="pun">(</span><span class="pln">first turn</span><span class="pun">)</span> <span class="kwd">done</span><span class="pun">.</span>
<span class="typ">Generate</span><span class="pln"> wxss</span><span class="pun">(</span><span class="pln">second turn</span><span class="pun">)...</span>
<span class="typ">Generate</span><span class="pln"> wxss</span><span class="pun">(</span><span class="pln">second turn</span><span class="pun">)</span> <span class="kwd">done</span><span class="pun">.</span>
<span class="typ">Save</span><span class="pln"> wxss</span><span class="pun">...</span>

本站资源来自互联网收集,仅供用于学习和交流,如有侵权不妥请联系本站删除!
喜欢 (0)
[]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址