当前位置:   article > 正文

手把手教你反编译小程序_小程序反编译

小程序反编译

本次实验环境

操作系统: win10 10.0.19042

node: v14.17.0

微信开发者工具: Stable 1.05.2110290

前期准备

  1. 在电脑端安装模拟器工具,这里以夜神模拟器为例,

    • 在模拟器中安装微信:用于微信打开小程序时加载小程序包。
    • 在模拟器中文件管理器:用于查看小程序包,这里使用模拟器自带的Amaze。
    • 文件共享路径:可以通过模拟器的文件助手查看文件共享路径,模拟器中的安卓共享路径对应于电脑共享路径。作用是方便后续找到并复制小程序包。
      在这里插入图片描述
  2. 下载反编译工具

    关注微信公众号“安前码后”,然后发送关键字xcx688即可获取。

开始反编译小程序

获取小程序包

  1. 这里以东方财富小程序为例,在夜神模拟器中登录微信,然后找到并打开东方财富小程序

  2. 打开模拟器中的Amaze文件管理器,进入到以下路径查找源码包(可以根据文件的下载时间,区分出你想要的源码包),不同的小程序中间的那段hash值是不一样的/data/data/com.tencent.mm/MicroMsg/7931eb2bec903760d4266d663b5fbd0e/appbrand/pkg

  3. 拷贝小程序文件包至模拟器共享文件夹,为了方便起见,可以先新建了一个文件夹wxcode,将复制的小程序包放到此文件夹下的东方财富文件夹


  4. 然后在电脑端的共享文件夹中,可以看到刚刚复制的小程序包
    在这里插入图片描述

开始解包

  1. 进入反编译工具wxappUnpacker项目的根目录,运行yarn install安装依赖包

  2. wxappUnpacker项目根目录下,执行解包命令node wuWxapkg.js <path/to/xxx.wxapkg>。一个小程序一般会有多个包,我们需要找出主包。执行解包命令时,后面的参数需要具体到主包的文件名。经过多次试验总结发现,一般主包是以 _-开头,文件名与其他的文件看起来是不同的。
    在这里插入图片描述

可以看到命令行输出如下提示:

$ node wuWxapkg.js ../dongFangCaiFu/_-2081057737_66.wxapkg
Unpack file ../dongFangCaiFu/_-2081057737_66.wxapkg...

Header info:
  firstMark: 0xbe
  unknownInfo:  0
  infoListLength:  6445
  dataLength:  2158356
  lastMark: 0xed

File list info:
  fileCount:  172
Saving files...
Unpack done.
Split app-service.js and make up configs & wxss & wxml & wxs...
deal config ok
deal js ok
deal html ok
deal css ok
splitJs: F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66\app-se
rvice.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 02CB91817FA2198
C64ADF986253F1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 0FD5E5F37FA2198
C69B38DF4E56F1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 11EAF9667FA2198
C778C91613F8F1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 1CC3D0F37FA2198
C7AA5B8F4A5BF1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 212D2CB47FA2198
C474B44B3E9ED1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 24EFAE017FA2198
C4289C606DDFE1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 3CE424D77FA2198
C5A824CD01A9F1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 44199CD77FA2198
C227FF4D0319E1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 4C52C3117FA2198
C2A34AB16818D1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 4E3F4A367FA2198
C28592231639D1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 50E340B47FA2198
C368528B3AD5E1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 5A0161E27FA2198
C3C6709E5BCAF1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 5B1C0EE47FA2198
C3D7A66E321EF1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 61219CD57FA2198
C0747F4D25F6E1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 6249DFF57FA2198
C042FB7F293FE1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 680649437FA2198
C0E602144E54F1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 69160F537FA2198
C0F706754BA2E1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 6987BC357FA2198
C0FE1D432427F1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 7B819AE57FA2198
C1DE7F2E233DE1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 8AC58DF47FA2198
CECA3E5F3B31E1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 8ACE1F557FA2198
CECA8775277FD1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 8D1643E27FA2198
CEB702BE507CD1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 99D2EAB27FA2198
CFFB482B564BD1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/arrayLikeToArray.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/arrayWithHoles.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/arrayWithoutHoles.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/asyncToGenerator.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/defineProperty.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/interopRequireDefault.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/iterableToArray.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/iterableToArrayLimit.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/nonIterableRest.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/nonIterableSpread.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/objectSpread2.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/slicedToArray.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/toConsumableArray.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/typeof.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
helpers/unsupportedIterableToArray.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 @babel/runtime/
regenerator.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 A2A31AD37FA2198
CC4C572D43E9E1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 A2E1F3817FA2198
CC4879B86A08E1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 ADC668017FA2198
CCBA0000675CF1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 B33469017FA2198
CD552010620FF1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 B4790A047FA2198
CD21F6203CEAE1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 C6F555147FA2198
CA0933D13385F1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 C7D2F7C37FA2198
CA1B49FC4CE1F1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 C92323547FA2198
CAF454B537B2F1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 D5D51E667FA2198
CB3B37661A5AD1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 D7E073717FA2198
CB1861B76F3EE1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 DD9D93E57FA2198
CBBFBFBE2D12E1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 E174D1B77FA2198
C8712B9B0BC0F1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 E48C9AB07FA2198
C82EAF2B73D3E1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 E9AA86447FA2198
C8FCCEE438F4E1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 F19F4B857FA2198
C97F92382008F1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 F4E555647FA2198
C92833D6310CE1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 F917D9857FA2198
C9F71B182FFCF1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 FE8EF1457FA2198
C98E8994269DD1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 FF3491C77FA2198
C9952F9C0870E1537.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 app.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/base
-modal/modal.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/call
-login-modal/call-login-modal.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/down
form/downform.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/foot
bar-share/footbar-share.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/foot
bar/footbar.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/imag
e-share copy/image-share.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/imag
e-share/image-share.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/kaih
uform/kaihuform.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/logi
n-modal/login-modal.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/moda
l/modal.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/navb
ar/navbar.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/navi
gator/navigator.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/open
app copy/openapp.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/open
app/openapp.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/stoc
k-list/stock-list.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/user
/user.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 components/zhi-
shu/zhi-shu.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/download
copy/download.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/index/ind
ex.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/kaihu/kai
hu.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/kaihuDeta
il/kaihuDetail.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/download/
download.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/market/ma
rket.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/stockDeta
il/stockDetail.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/gubaDetai
l/gubaDetail.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/protocol/
index.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/LoginInde
x/LoginIndex.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/timeShare
/timeShare.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/timeShare
HK/timeShareHK.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/timeShare
US/timeShareUS.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/SearchPag
e/SearchPage.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/informati
onDetail/informationDetail.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/LoginPage
/Login.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/My/My.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/Bindinged
EMPage/BindingedEMPage.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/zixun/zix
un.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/zixunDeta
il/zixunDetail.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/gubaPost/
gubaPost.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/loginByTe
l/loginByTel.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/BPTest/BP
Test.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/viewDialo
g/viewDialog.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/test/test
.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/bankuai/b
ankuai.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/data/data
.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/me/me.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/error/err
or.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/Agreement
View/AgreementView.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/fissionkh
Auth/fissionkhAuth.js
F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66 pages/fissionkh
AuthSucc/fissionkhAuthSucc.js
Splitting "F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66\app-
service.js" done.
Decompile ./components/base-modal/modal.wxml...
Decompile success!
Decompile ./components/call-login-modal/call-login-modal.wxml...
Decompile success!
Decompile ./components/downform/downform.wxml...
Decompile success!
Decompile ./components/footbar-share/footbar-share.wxml...
Decompile success!
Decompile ./components/footbar/footbar.wxml...
Decompile success!
Decompile ./components/image-share copy/image-share.wxml...
Decompile success!
Decompile ./components/image-share/image-share.wxml...
Decompile success!
Decompile ./components/kaihuform/kaihuform.wxml...
Decompile success!
Decompile ./components/login-modal/login-modal.wxml...
Decompile success!
Decompile ./components/modal/modal.wxml...
Decompile success!
Decompile ./components/navbar/navbar.wxml...
Decompile success!
Decompile ./components/navigator/navigator.wxml...
Decompile success!
Decompile ./components/openapp copy/openapp.wxml...
Decompile success!
Decompile ./components/openapp/openapp.wxml...
Decompile success!
Decompile ./components/stock-list/stock-list.wxml...
Decompile success!
Decompile ./components/user/user.wxml...
Decompile success!
Decompile ./components/zhi-shu/zhi-shu.wxml...
Decompile success!
Decompile ./pages/AgreementView/AgreementView.wxml...
Decompile success!
Decompile ./pages/BPTest/BPTest.wxml...
Decompile success!
Decompile ./pages/BindingedEMPage/BindingedEMPage.wxml...
Decompile success!
Decompile ./pages/LoginIndex/LoginIndex.wxml...
Decompile success!
Decompile ./pages/LoginPage/Login.wxml...
Decompile success!
Decompile ./pages/My/My.wxml...
Decompile success!
Decompile ./pages/SearchPage/SearchPage.wxml...
Decompile success!
Decompile ./pages/bankuai/bankuai.wxml...
Decompile success!
Decompile ./pages/data/data.wxml...
Decompile success!
Decompile ./pages/download copy/download.wxml...
Decompile success!
Decompile ./pages/download/download.wxml...
Decompile success!
Decompile ./pages/error/error.wxml...
Decompile success!
Decompile ./pages/fissionkhAuth/fissionkhAuth.wxml...
Decompile success!
Decompile ./pages/fissionkhAuthSucc/fissionkhAuthSucc.wxml...
Decompile success!
Decompile ./pages/gubaDetail/gubaDetail.wxml...
Decompile success!
Decompile ./pages/gubaPost/gubaPost.wxml...
Decompile success!
Decompile ./pages/index/index.wxml...
Decompile success!
Decompile ./pages/informationDetail/informationDetail.wxml...
Decompile success!
Decompile ./pages/kaihu/kaihu.wxml...
Decompile success!
Decompile ./pages/kaihuDetail/kaihuDetail.wxml...
Decompile success!
Decompile ./pages/loginByTel/loginByTel.wxml...
Decompile success!
Decompile ./pages/market/market.wxml...
Decompile success!
Decompile ./pages/me/me.wxml...
Decompile success!
Decompile ./pages/protocol/index.wxml...
Decompile success!
Decompile ./pages/stockDetail/stockDetail.wxml...
Decompile success!
Decompile ./pages/test/test.wxml...
Decompile success!
Decompile ./pages/timeShare/timeShare.wxml...
Decompile success!
Decompile ./pages/timeShareHK/timeShareHK.wxml...
Decompile success!
Decompile ./pages/timeShareUS/timeShareUS.wxml...
Decompile success!
Decompile ./pages/viewDialog/viewDialog.wxml...
Decompile success!
Decompile ./pages/zixun/zixun.wxml...
Decompile success!
Decompile ./pages/zixunDetail/zixunDetail.wxml...
Decompile success!
Guess wxss(first turn)...
Regard F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66\app.wxss
 as pure import file.
Regard F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66\pages\ba
nkuai\bankuai.wxss as pure import file.
Regard F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66\pages\gu
baDetail\gubaDetail.wxss as pure import file.
Regard F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66\pages\ti
meShare\timeShare.wxss as pure import file.
Import count info: {"./app.wxss":7,"./pages/index/index.wxss":5,"./pages/gubaD
etail/gubaDetail.wxss":2,"./timeShareCommon.wxss":4}
Guess wxss(first turn) done.
Generate wxss(second turn)...
Generate wxss(second turn) done.
Save wxss...
saveDir: F:\webstormProjects\mini-program\dongFangCaiFu\_-2081057737_66
Split and make up done.
Delete files...
Deleted.

File done.
Total use: 5.626s
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  1. 如果想单独执行config、js、wxml、wxss的反编译可以在解包时加-o参数不做后续操作

  2. 工具的其他脚本的用法:

    • node wuConfig.js <files...> 将 app-config.json 中的内容拆分到各个文件对应的 .json 和 app.json , 并通过搜索 app-config.json 所在文件夹下的所有文件尝试将 iconData 还原为 iconPath 。
    • node wuJs.js <files...> 将 app-service.js (或小游戏中的 game.js ) 拆分成一系列原先独立的 javascript 文件,并使用 Uglify-ES 美化,从而尽可能还原编译前的情况。
    • node wuWxml.js [-m] <files...> 将编译/混合到 page-frame.html ( 或 app-wxss.js ) 中的 wxml 和 wxs 文件还原为独立的、未编译的文件。如果加上-m指令,就会阻止block块自动省略,可能帮助解决一些相关过程的 bug 。
    • node wuWxss.js <dirs...> 通过获取文件夹下的 page-frame.html ( 或 app-wxss.js ) 和其他 html 文件的内容,还原出编译前 wxss 文件的内容。
    • node wuWxapkg.js [-o] [-d] [-s=<Main Dir>] <files...> 将 wxapkg 文件解包,并将包中上述命令中所提的被编译/混合的文件自动地恢复原状。如果加上-o指令,表示仅解包,不做后续操作。如果加上-d指令,就会保留编译/混合后所生成的新文件,否则会自动删去这些文件。同时,前面命令中的指令也可直接加在这一命令上。

导入开发者工具

打开微信开发者工具,导入项目即可。

在本次的东方财富小程序解包后,注意在开发者工具的详情--->本地设置

  • 勾掉e6转es5(这个小程序貌似并没有使用es6语法)
  • 注意勾选不校验合法域名

解包其它小程序可能项目配置略有不同,多调试调试。

扩展小结

体验版解包

体验版的需要找到debug开头的文件(形如:debug_xxx 是没有后缀的),然后拿到文件后手动添加wxapkg后缀再执行以上操作,即可完成解包。

解包时提示是子包

解决:有些小程序可能采取了分包策略,所以就有一个主包和多个子包之分。经过多次试验总结发现,一般主包是以 _-开头,文件名与其他的文件看起来是不同的。

在这里插入图片描述

写在最后

今天的干货就分享到这里。欢迎一键三连,持续关注“安前码后”,一个只输出干货而不是随大流的技术号。另外,赚钱的号“韭盾”,也在持续开发中,有投资兴趣的铁子们可以先关注,绝对是好物。 加油,铁子们。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/323422
推荐阅读
相关标签
  

闽ICP备14008679号