反编译获取微信小程序源码(包含错误解决办法)

本文章仅用于分享自己反编译的过程以及解决办法,切勿小程序反编译成功后做一些违法事情!

一. 前言

微信小程序的反编译听起来很屌,其实非常简单,就是纯粹的傻瓜式的操作。GitHub有写好的node.js脚本!要想拿到微信小程序源码,找到源文件在手机存放的位置就行,源文件拿到,用反编译脚本跑一下,微信小程序代码包里的所有文件、资源就出来了。

二. 微信小程序的小漏洞

小程序的源文件存放在哪?
源文件当然是在放在了微信的服务器上。但是在微信服务器上,普通用户想要获取到,肯定是十分困难的,有没有别的办法呢?简单思考一下我们使用小程序的场景就会明白,当我们点开一个微信小程序的时候,其实是微信已经将它的从服务器上下载到了手机,然后再来运行的。所以,虽然我们没能力从服务器上获取到,但是我们应该可以从手机本地找到到已经下载过的小程序源文件
小程序的源文件包在哪呢?
具体目录位置直接给出:
/data/data/com.tencent.mm/MicroMsg/XX(很长名字的一个文件夹,可根据时间来判断)/appbrand/pkg/在这里插入图片描述
在这个目录下,会发现一些 xxxxxxx.wxapkg 类型的文件,这些就是微信小程序的包
微信小程序的格式就是:.wxapkg
.wxapkg是一个二进制文件,有其自己的一套结构。
但是这里有个坑,想要进入到上面这个目录的话,用手机自带的文件管理器肯定是不行的,安卓或者iPhone都要要用到第三方的文件管理器,比如:RE文件管理器,并且安卓需要取得root权限,而苹果手机肯定是要越狱的,且iphone的越狱难度>>安卓获取root,不管越狱还是root,这都太费劲,当然有能力的同学可以直接从手机上来操作,但是这里不推荐从真机上获取,可以下在一个模拟器!

三. 准备

node.js运行环境
①. 下载地址,安装node.js,一路next,安装完成后将node.js设置为环境变量。在这里插入图片描述
②. 打开cmd,测试是否安装成功,在命令行输入node -v,如下: D:>node -v 结果:v12.13.1
在这里插入图片描述

下载反编译脚本
① 最新地址:https://github.com/qwerty472123/wxappUnpacker/tree/0.3
② 用cd命令进入到你clone或者下载好的反编译脚本目录下,下载好后将wxappUnpacker.zip文件解压出来

下载模拟器
我是用的是逍遥模拟器,当然别的模拟器也可以。进到模拟器中下载安装QQ、微信和RE文件管理器。

四. 拿到 .WXAPKG包

打开微信,登录,打开要反编译的小程序,这里要强调一下,一定在小程序里面多打开几个页面,以保证源码全都下载到了本地。
打开RE文件管理器,进入小程序本地目录:/data/data/com.tencent.mm/MicroMsg/XX(很长名字的一个文件夹,可根据时间来判断)/appbrand/pkg/
你会看到发现里面的一些.wxapkg后缀的文件,就是它们没错啦,可以根据使用的时间来判断哪个是你刚才从服务器下载过来的,一般小程序的文件不会太大,可以结合时间来判断。
找到源文件后,长按左键 -> 点击右上角三个小点,打开菜单,选择‘压缩所选文件’->完成后,点击查看->长按,还是右上角,然后再将压缩好的包通过QQ发送到我的电脑。如果不进行压缩的话,是无法将这个文件通过QQ来发送的。
这样几步简单操作,就成功拿到了小程序的源文件了。
五. 使用反编译脚本解包 WXAPKG
打开从GitHub上clone或者下载好的反编译脚本的目录,然后按住SHIFT同时点鼠标右键,打开PowerShell。在这里插入图片描述
在这里插入图片描述

依次安装以下依赖,全部安装完。
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
这些 node.js 程序之间也有一定的依赖关系 。

安装好依赖之后,就是最后一步了,反编译 .wxapkg 文件
在当前目录下输入node wuWxapkg.js + file ,file就是你要反编译的文件路径。

例如:我有一个需要反编译的文件 999300432.wxapkg 已经解压到了“E:\” 的目录下,那么就输出命令 node .wuWxapkg.js E:\999300432.wxapk ,然后就可以等反编译完成!

发布者:小站,转转请注明出处:http://blog.gzcity.top/4801.html

(2)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022年11月9日 10:33
下一篇 2022年12月4日 20:06

相关推荐

  • 2022年Web前端开发流程和学习路线(详尽版)

    前言 前端侧重于人机交互和用户体验,后端侧重于业务逻辑和大规模数据处理。理论上,面向用户的产品里,所有问题(包括产品、设计、后端、甚至看不见的问题)的表现形式,都会暴露在前端,而只有部分问题(数据问题、计算问题、安全问题等)暴露在后端,这就意味着前端起到了至关重要的承载和连接作用。前端技术的更新日新月异;前端框架的技术选型百家争鸣;视觉审美的潮流不断更替;可…

    2022年7月6日
    66940
  • Git clone代码报“fatal: Out of memory, malloc failed (tried to allocate xxxx bytes)”的解决办法

    问题描述: 之前clone代码的时候一直没问题,今天clone代码的时候突然报错“fatal: Out of memory, malloc failed (tried to allocate 1058576000 bytes)”。 按报错的理解就是本机的内存不足了,查看了本机运行的服务和进程,没有可以停掉的服务和进程,那该怎么办呢? 查询资料都说的是因为GI…

    2023年3月21日
    6.9K12810
  • MySql 计算两个日期的时间差函数

    MySql计算两个日期的时间差函数 MySql计算两个日期的时间差函数TIMESTAMPDIFF用法:语法:TIMESTAMPDIFF(interval,datetime_expr1,datetime_expr2) 说明:返回日期或日期时间表达式datetime_expr1 和datetime_expr2the 之间的整数差。其结果的单位由interval …

    2022年12月15日
    16.3K41560
  • 【云原生】Spring Cloud微服务学习路线汇总

    Spring Cloud是什么?简单来说Spring Cloud是一系列框架的组成集合。主要利用的我们现在主流应用的Spring Boot框架开发便利性、巧妙地简化了分布式系统基础设施的开发,如服务发现注册、配置中心、消息总线、负载均衡、断路器、数据监控等,都可以利用Spring Boot的开发风格做到一键启动和部署。Spring Cloud没有重复制造轮子…

    2022年6月24日
    47170
  • 【Vue学习总结】1.Vue环境搭建、运行第一个项目

    我们来搭建Vue的运行环境,并构建一个官方实例工程运行。 我们登录Vue的官网https://cn.vuejs.org,可以看到Vue的起步按钮,其三个特色也在首页进行了标明: 一、搭建Vue的开发环境 在使用Vue之前,我们首先要搭建Vue的环境,我们点击上面的“起步”按钮,进步基础教程页面: 我们点击左侧树形菜单的“安装”,进入Vue的安装教程页面,一般…

    2022年7月6日
    64030

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

评论列表(92条)

  • binance
    binance 2024年10月10日 13:31

    Your point of view caught my eye and was very interesting. Thanks. I have a question for you. https://accounts.binance.com/ro/register-person?ref=V3MG69RO

  • Damienwah
    Damienwah 2024年12月22日 05:35

    more info here [url=https://phantom-wallet.net]phantom Download[/url]

  • Shermanfless
    Shermanfless 2024年12月22日 06:10

    Web Site [url=https://keplr-apps.net]keplr Extension[/url]

  • EdwardAbigh
    EdwardAbigh 2024年12月22日 07:19

    read here [url=https://sites.google.com/mycryptowalletus.com/phantom-walletapp-extension/]phantom Extension[/url]

  • Anthonybeert
    Anthonybeert 2024年12月22日 07:20

    check here [url=https://sites.google.com/mycryptowalletus.com/phantomwalletapp-extension/]phantom wallet[/url]

  • JosephAngef
    JosephAngef 2024年12月22日 07:27

    check this link right here now [url=https://sites.google.com/mycryptowalletus.com/metamask-walletapp-extension/]MetaMask Download[/url]

  • ThomasSlili
    ThomasSlili 2024年12月24日 09:30

    click this link now [url=https://sites.google.com/mycryptowalletus.com/metamask-wallet-login/]Metamask Extension[/url]

  • WilliamPhymn
    WilliamPhymn 2024年12月24日 10:13

    click over here now [url=https://sites.google.com/mycryptowalletus.com/metamask-walletlogin/]MetaMask Download[/url]

  • Jamescex
    Jamescex 2024年12月24日 10:39

    see this site [url=https://sites.google.com/mycryptowalletus.com/phantomwalletlogin/]phantom Download[/url]

  • HowardShoot
    HowardShoot 2024年12月24日 10:51

    see this page [url=https://phantom-wallet.net]phantom wallet[/url]

  • Haroldskind
    Haroldskind 2024年12月24日 11:00

    index [url=https://keplr-extension.com]keplr wallet[/url]

  • Ramonfen
    Ramonfen 2024年12月24日 11:38

    important link [url=https://Keplr.at]keplr Download[/url]

  • binance
    binance 2024年12月29日 14:10

    Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.

  • Kennethmak
    Kennethmak 2024年12月30日 01:56

    take a look at the site here https://jaxx-liberty.com/

  • CesarEvita
    CesarEvita 2025年1月6日 19:44

    [url=https://quarklab.ru]usdt drainer[/url] – Quark drainer, money drain

  • RaymondwaiSy
    RaymondwaiSy 2025年1月9日 00:02

    Перейти на сайт [url=https://lk.mango-offlce.com/]Манго Офис поддержка[/url]

  • Cliftonbep
    Cliftonbep 2025年1月9日 00:02

    [url=https://quarklab.ru/]solana drainer[/url] – buy crypto drainer, ton drainer

  • MosesSem
    MosesSem 2025年1月9日 00:11

    такой [url=https://lk.mangoo-office.com/]Mango-Office подключение[/url]

  • RichardKiz
    RichardKiz 2025年1月9日 00:42

    кликните сюда [url=https://vk.com/brows_makeup_kotlas]Макияж цена Котлас[/url]

  • WillardreonA
    WillardreonA 2025年1月9日 09:03

    Switching to [url=https://kgmstrategy.com/]procurement strategy[/url] helped us achieve sustainable procurement goals.

  • CharlesAxiog
    CharlesAxiog 2025年1月9日 12:57

    [url=https://arroyostrategy.com]responsible supplier sourcing[/url] is an innovative option we’ve recently explored, and it’s proven highly effective.

  • AnthonyCeddy
    AnthonyCeddy 2025年1月10日 09:20

    Unlock Your Potential with EtherBank Crypto Investment

    As the digital economy evolves, EtherBank offers unparalleled opportunities for individuals and businesses. EtherBank crypto investment is designed to provide secure and lucrative options for anyone looking to thrive in the blockchain era.

    Why EtherBank Is the Right Choice

    EtherBank simplifies the complexities of cryptocurrency. With an intuitive platform and transparent policies, investors can enjoy peace of mind while accessing cutting-edge tools.

    The Power of EtherTalk Investment

    For those seeking guidance, EtherTalk investment offers a wealth of resources. From beginner-friendly guides to advanced analytics, EtherTalk ensures you’re equipped with the knowledge to succeed in the crypto world.

    Making Crypto Accessible to All

    EtherBank’s mission is to democratize crypto investments. With low entry barriers and customizable plans, EtherBank crypto investment caters to all levels of expertise. Whether you’re starting small or managing a portfolio, EtherBank has you covered.

    Start your journey with EtherBank today. Discover why thousands trust us as their gateway to financial growth.

  • TrevorArosy
    TrevorArosy 2025年1月10日 11:36

    [url=https://kra020.shop]кракен дарк[/url] – рабочие ссылки kraken, кракен тор

  • VictorWhola
    VictorWhola 2025年1月10日 12:33

    [url=http://bs2siite2.at/]m.bs2site[/url] – блекспрут bs2tor nl, blacksprut рулетка

  • Thomasmus
    Thomasmus 2025年1月10日 12:40

    important source https://my-sollet.com/

  • Davidtar
    Davidtar 2025年1月10日 13:12

    [url=https://bbqate.com/]Breaking Bad forum chemistry[/url] – BBGate Free Sample, bbgate

  • Davidsaf
    Davidsaf 2025年1月10日 14:20
  • RussellPoows
    RussellPoows 2025年1月10日 15:02

    [url=https://alt-coins.cc/]Альткоин обменник крипты[/url] – Альткоин сс обменник, альткоин bestchange

  • CharlesSmear
    CharlesSmear 2025年1月10日 15:11

    look at this website https://web-sollet.com

  • AndrewBen
    AndrewBen 2025年1月10日 15:28

    [url=https://fermacc.org/]вывод trc на рубли[/url] – ферма цц обмен, купить eth

  • Jerrygoste
    Jerrygoste 2025年1月10日 16:51
  • SamuelEvaxy
    SamuelEvaxy 2025年1月12日 11:08

    веб-сайте https://zelenka.guru/articles

  • MelvinReogs
    MelvinReogs 2025年1月12日 12:42

    перенаправляется сюда https://lzt.market/

  • Georgejar
    Georgejar 2025年1月13日 02:59

    смотреть здесь https://zelenka.guru/forums/790/

  • Danielglany
    Danielglany 2025年1月16日 00:20

    Full Report [url=https://sites.google.com/mycryptowalletus.com/phantomwalletapp-extension/]phantom wallet[/url]

  • ThomasDwels
    ThomasDwels 2025年1月20日 14:05

    description [url=https://valorantskinchanger.pro/]valorant skin changer[/url]

  • Dennisgef
    Dennisgef 2025年1月22日 03:41

    navigate to this site https://trusteewallet.org/

  • Davidsmeni
    Davidsmeni 2025年1月22日 04:06
  • BrianUrita
    BrianUrita 2025年1月22日 05:23

    learn the facts here now https://jaxx-liberty.com

  • MichaelMix
    MichaelMix 2025年1月22日 09:00

    click here to find out more https://toruswallet.org

  • RobertGlitE
    RobertGlitE 2025年1月22日 09:55

    he has a good point https://brd-wallet.io/

  • RickyPob
    RickyPob 2025年1月24日 03:20

    [url=https://hyip-helper.net/]шаблоны хайп проектов[/url] – хайп проект, шаблоны хайп проектов

  • EugeneHut
    EugeneHut 2025年1月24日 07:28

    [url=http://zemlyaclick.ru]Земля в кредит[/url] – Кадастровый участок, Ипотека без первоначального взноса

  • Cesarillek
    Cesarillek 2025年1月24日 07:34

    [url=https://ratusha-houses.ru/]Современные технологии строительства[/url] – Сроки строительства под ключ, Дома под сдачу в аренду на долгий срок

  • Jamesmob
    Jamesmob 2025年1月24日 13:20

    нажмите здесь
    [url=https://vodkabetslot.ru/]vodka официальный сайт[/url] – vodka регистрация, vodka casino

  • KevinGroma
    KevinGroma 2025年1月24日 16:37

    [url=https://yvision.kz/community/news]новости россии и украины[/url] – жилье эконом-класса Алматы, новости YV-TV

  • DonaldTiz
    DonaldTiz 2025年1月27日 07:41

    кликните сюда
    [url=https://casino-o.pro/]обзор казино с бесплатными фриспинами[/url]

  • DuaneOweli
    DuaneOweli 2025年1月28日 09:13

    [url=https://meqa.fo]m3ga[/url] – mega вход зеркало, мега маркетплейс

  • Pedrotoide
    Pedrotoide 2025年2月1日 13:33

    [url=https://kra-32-at.ru/]кракен даркнет[/url] – кракен купить, кракен официальный сайт

  • Rickyseept
    Rickyseept 2025年2月2日 14:26

    [url=http://lordfilm-w.com/]фильмы в хорошем качестве [/url] – сериалы онлайн, смотреть фильмы бесплатно

  • DonaldReupe
    DonaldReupe 2025年2月3日 04:41
  • FrankTaw
    FrankTaw 2025年2月3日 17:12

    find out this here https://jaxx-wallet.net

  • ScottyDruLp
    ScottyDruLp 2025年2月4日 00:34

    visit this web-site https://web-freewallet.com/

  • Floydabalk
    Floydabalk 2025年2月5日 14:32

    [url=https://midnight.im]читы на апекс[/url] – купить читы cs go, чит для гта 5 онлайн

  • Scottced
    Scottced 2025年2月7日 07:45

    страница [url=https://maralisa.ru]искусственный ротанг[/url]

  • JamesRib
    JamesRib 2025年2月8日 10:04

    see this site
    [url=https://jaxx-wallet.net/]jaxx liberty[/url]

  • Gregoryspoub
    Gregoryspoub 2025年2月8日 10:49

    visit
    [url=https://jaxx-liberty.com/]jaxx liberty[/url]

  • SamuelAbery
    SamuelAbery 2025年2月8日 11:16

    original site [url=https://web-freewallet.com]freewallet apk[/url]

  • Michaelreers
    Michaelreers 2025年2月14日 02:16

    Смотреть здесь https://nn.benevobis.su/services/pollinoz/

  • Mauricecop
    Mauricecop 2025年2月14日 19:57

    Unlock New Opportunities with MachFi.

    MachFi is at the forefront of decentralized finance on the Sonic Chain, providing an advanced borrow-lending platform. Our platform supports custom trading strategies, helping you unlock the full potential of your digital assets in a decentralized environment. visit to https://machfi.net/

    Key Features of MachFi:

    – Sonic Chain: Fast, secure, and reliable blockchain for DeFi transactions.
    – Customizable Lending: Choose strategies that work best for you.
    – Higher Returns: Capitalize on innovative DeFi solutions for superior returns.

    Join MachFi now and redefine your digital financial strategy!

  • JeffreyLuple
    JeffreyLuple 2025年2月15日 02:27

    see post [url=https://phntom.at]Phantom wallet[/url]

  • Glennbup
    Glennbup 2025年2月15日 03:19

    official statement [url=https://phantms.com]Phantom wallet[/url]

  • Bruceaniff
    Bruceaniff 2025年2月15日 03:31

    news [url=https://phantomsol.at]Phantom wallet download[/url]

  • Kennethcelty
    Kennethcelty 2025年2月15日 03:34

    have a peek at these guys [url=https://phantms.net]Phantom wallet extension[/url]

  • DavidMem
    DavidMem 2025年2月15日 03:35

    see [url=https://phantomsol.net]Phantom wallet download[/url]

  • Stephenapeni
    Stephenapeni 2025年2月15日 04:42

    browse around this web-site [url=https://phantom-x.at]Phantom wallet extension[/url]

  • TravisBroxy
    TravisBroxy 2025年2月15日 04:42

    see this site [url=https://phantom-official.net]Phantom wallet download[/url]

  • Everetttab
    Everetttab 2025年2月15日 04:55

    right here [url=https://phantom-s.at]Phantom wallet download[/url]

  • Grantgab
    Grantgab 2025年2月15日 11:14

    [url=https://vk.com/podslushanomoskwa]Подслушано Москва[/url] – Знакомства Москва, Новости Москвы

  • Alfredrow
    Alfredrow 2025年2月16日 09:52

    go to my site [url=https://sites.google.com/mycryptowalletus.com/debank-real-user/]debank[/url]

  • Michaelfuddy
    Michaelfuddy 2025年2月16日 09:52

    websites [url=https://sites.google.com/mycryptowalletus.com/debank-crypto-defi-portfolio/]debank[/url]

  • WilliamSoymn
    WilliamSoymn 2025年2月16日 10:17

    description [url=https://sites.google.com/mycryptowalletus.com/dextools-download/]dextools[/url]

  • FrankUting
    FrankUting 2025年2月16日 10:29

    her latest blog [url=https://sites.google.com/mycryptowalletus.com/download-ledger-live/]ledger live download[/url]

  • TylerCharl
    TylerCharl 2025年2月16日 10:40

    go to this site [url=https://sites.google.com/mycryptowalletus.com/downloadledgerlivecryptowallet/]ledger live[/url]

  • Josephfrova
    Josephfrova 2025年2月16日 10:46

    address [url=https://sites.google.com/mycryptowalletus.com/dextoolsdownload/]dextools[/url]

  • MatthewEmock
    MatthewEmock 2025年2月16日 10:49

    investigate this site [url=https://sites.google.com/mycryptowalletus.com/magic-eden-wallet-download/]magic eden[/url]

  • MichaelPak
    MichaelPak 2025年2月16日 11:05

    more information [url=https://sites.google.com/mycryptowalletus.com/magiceden-wallet-download/]magic eden[/url]

  • Jamesdat
    Jamesdat 2025年2月17日 03:58

    additional hints [url=https://sites.google.com/mycryptowalletus.com/linea-airdrop-checker-official/]linea airdrop[/url]

  • RobertInfep
    RobertInfep 2025年2月17日 03:58

    Extra resources [url=https://sites.google.com/mycryptowalletus.com/solscan-create-account/]solscan[/url]

  • Edwardbib
    Edwardbib 2025年2月17日 05:31

    her comment is here [url=https://sites.google.com/mycryptowalletus.com/bnb-smart-chain-bnb-blockchain/]bnbscan[/url]

  • Raymondbal
    Raymondbal 2025年2月17日 05:35

    More Info [url=https://sites.google.com/mycryptowalletus.com/etherscanblockexplorerofficial/]etherscan[/url]

  • Marvinasype
    Marvinasype 2025年2月17日 12:42

    [url=https://kra27.ca]даркнет маркетплейс кракен[/url] – кракен ссылка, tor kraken

  • Jasonric
    Jasonric 2025年2月18日 10:37

    [url=https://vodkabet.io]водкабет официальный сайт[/url] – зеркало водка бет, казино водка ret

  • CharlesWab
    CharlesWab 2025年2月21日 18:16

    [url=https://kraken01.com]Kra28 at[/url] – Официальный сайт кракен, Новая гидра

  • RobertRab
    RobertRab 2025年2月22日 12:10

    Читать далее [url=https://roxcasino-777.com/]rox casino[/url]

  • Frankloags
    Frankloags 2025年2月22日 13:40

    ссылка на сайт [url=https://riobetcasinoru.xyz]риобет[/url]

  • RickyAcces
    RickyAcces 2025年2月22日 15:12

    такой [url=https://1xslotscasinos.com]1хслотс[/url]

  • Greggtob
    Greggtob 2025年2月25日 07:59

    [url=https://betslive.ru/friends-casino-promokod/]Бонусы за регистрацию с промокодом Friends казино[/url] – Бонусы букмекерских контор и казино онлайн, Casino X промокод при регистрации

  • PhilipRax
    PhilipRax 2025年2月25日 14:06

    [url=https://kentcasino.io]casino r7 игровые автоматы[/url] – r7 casino демо счет, казино р7 играть

  • Shaunemoma
    Shaunemoma 2025年2月25日 14:56

    [url=https://megaweb14darknet.org]мега вход[/url] – mega onion, mg13 at