GithubHelp home page GithubHelp logo

pc_wxapkg_decrypt's Introduction

windows PC端wxapkg解密

说明

由于不想安装安卓模拟器去提取wxapkg包,windows PC端的微信也支持小程序,但是PC端的wxapkg是被加密存储的。该项目是把wxapkg解密。目前微信PC版本为:2.9.5.31.

使用方法

pc_wxapkg_decrypt.exe -wxid 微信小程序id -in 要解密的wxapkg路径 -out 解密后的路径

pc_wxapkg_decrypt.exe -h

Usage of pc_wxapkg_decrypt.exe:
   -in string
         需要解密的wxapkg的文件路径 (default "__APP__.wxapkg")
   -iv string
         AES加密的IV,默认不需要设置,如果版本有变化,设置 (default "the iv: 16 bytes")
   -out string
         解密后的wxapkg的文件路径 (default "dec.wxapkg")
   -salt string
         pbkdf2用到的salt,默认不需要设置 (default "saltiest")
   -wxid string
         小程序的id

wxapkg路径为:C:\Users\xxxx\Documents\WeChat Files\Applet\wx2xxx84w9w7a3xxxx\_APP_.wxapkg,小程序id为:wx2xxx84w9w7a3xxxx

解密完成后,就可以用wxappUnpacker(https://github.com/gudqs7/wxappUnpacker)解包了。

原理

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

加密方法为:

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

pc_wxapkg_decrypt's People

Contributors

blacktrace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pc_wxapkg_decrypt's Issues

新版的微信解密部分错误

pc微信版本 3.9.2.23,使用解密后,出来的文件,与安卓未加密版本对比,发现有不同
前面996字节也是对的,1024字节后是对的,中间部分对不上
前面1024个字节,最后32字节部,解密内容与未加密版本不同

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.