Code Monkey home page Code Monkey logo

wxappunpacker's Introduction

wxappUnpacker

版本 0.3 支持的微信版本 >20180111 高级特性支持度 0

Forked from https://github.com/system-cpu/wxappUnpacker

Wechat App(微信小程序, .wxapkg)解包及相关文件(.wxss, .json, .wxs, .wxml)还原工具

wxapkg 包的获取

Android 手机最近使用过的微信小程序所对应的 wxapkg 包文件都存储在特定文件夹下,可通过以下命令查看:

adb pull /data/data/com.tencent.mm/MicroMsg/{User}/appbrand/pkg

其中`{User}` 为当前用户的用户名,类似于 `2bc**************b65`。

安装

npm install

依赖

这些 node.js 程序除了自带的 API 外还依赖于以下包: cssbeautifyCSSTreeVM2EsprimaUglifyESjs-beautify

您需要安装这些包才能正确执行这些程序,为了做到这一点,您可以执行npm install;另外如需全局安装这些包可执行以下命令:

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

此外,这些 node.js 程序之间也有一定的依赖关系,比如他们都依赖于 wuLib.js 。

使用

node wuWxapkg.js .wxapkg 的文件路径 // 例子 D:/node/wxappUnpacker-master._1123949441_321.wxapkg

分包功能

当检测到 wxapkg 为子包时, 添加-s 参数指定主包源码路径即可自动将子包的 wxss,wxml,js 解析到主包的对应位置下. 完整流程大致如下:

  1. 获取主包和若干子包
  2. 解包主包 ./bingo.sh testpkg/master-xxx.wxapkg
  3. 解包子包 ./bingo.sh testpkg/sub-1-xxx.wxapkg -s=../master-xxx

TIP

-s 参数可为相对路径或绝对路径, 推荐使用绝对路径, 因为相对路径的起点不是当前目录 而是子包解包后的目录

├── testpkg
│   ├── sub-1-xxx.wxapkg #被解析子包
│   └── sub-1-xxx               #相对路径的起点
│       ├── app-service.js
│   ├── master-xxx.wxapkg
│   └── master-xxx             # ../master-xxx 就是这个目录
│       ├── app.json

本人代搭建流量主小程序

  技术微信 : li1664771111

支持

  Star 一个吧

wxappunpacker's People

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.