吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 40836|回复: 110
收起左侧

[原创工具] 【原创】微信小程序wxapkg解包器c++版 免装py环境 绿色90k

    [复制链接]
psp7456 发表于 2018-1-10 11:52
本帖最后由 psp7456 于 2018-1-10 11:54 编辑

1.jpg

WxApkgUnpacker.zip (78.62 KB, 下载次数: 2352)


867F5078-C383-45DB-B5A9-F17615FDB0DE.png

[Python] 纯文本查看 复制代码
#!/usr/bin/env python2
 
# lrdcq 
# usage python2 unwxapkg.py filename
 
import sys, os
import struct
 
class WxapkgFile(object):
  nameLen = 0
  name = ""
  offset = 0
  size = 0


if len(sys.argv) < 2:
  print 'usage: unwxapkg.py filename'
  exit()


with open(sys.argv[1], "rb") as f:
 
  root = os.path.dirname(os.path.realpath(f.name))
  name = os.path.basename(f.name) + '_dir'

  if len(sys.argv) > 2:
    name = sys.argv[2]
 
  #read header
 
  firstMark = struct.unpack('B', f.read(1))[0]
  print 'first header mark = ' + str(firstMark)
 
  info1 = struct.unpack('>L', f.read(4))[0]
  print 'info1 = ' + str(info1)
 
  indexInfoLength = struct.unpack('>L', f.read(4))[0]
  print 'indexInfoLength = ' + str(indexInfoLength)
 
  bodyInfoLength = struct.unpack('>L', f.read(4))[0]
  print 'bodyInfoLength = ' + str(bodyInfoLength)
 
  lastMark = struct.unpack('B', f.read(1))[0]
  print 'last header mark = ' + str(lastMark)
 
  if firstMark != 0xBE or lastMark != 0xED:
    print 'its not a wxapkg file!!!!!'
    exit()
 
  fileCount = struct.unpack('>L', f.read(4))[0]
  print 'fileCount = ' + str(fileCount)
 
  #read index
 
  fileList = []
 
  for i in range(fileCount):
 
    data = WxapkgFile()
    data.nameLen = struct.unpack('>L', f.read(4))[0]
    data.name = f.read(data.nameLen)
    data.offset = struct.unpack('>L', f.read(4))[0]
    data.size = struct.unpack('>L', f.read(4))[0]
 
    print 'readFile = ' + data.name + ' at Offset = ' + str(data.offset)
 
    fileList.append(data)
 
  #save files
   
  for d in fileList:
    d.name = '/' + name + d.name
    path = root + os.path.dirname(d.name)
 
    if not os.path.exists(path):
      os.makedirs(path)
 
    w = open(root + d.name, 'w')
    f.seek(d.offset)
    w.write(f.read(d.size))
    w.close()
 
    print 'writeFile = ' + root + d.name
 
  f.close()

基于lrdcp大神的py的源码,用mfc写的gui程序,免py环境安装,方便使用。
wxapkg的存储位置:/data/data/com.tencent.mm/MicroMsg/{User}/appbrand/pkg
{User} 为用户的用户名,pkg目录就是微信用于存放小程序和小游戏下载包的位置。


附上哈勃分析链:https://habo.qq.com/file/showdetail?pk=ADMGYl1qB2UIMFs8

免费评分

参与人数 21吾爱币 +25 热心值 +19 收起 理由
l23k + 1 + 1 我很赞同!
爱情小书生 + 1 请教如何使用工具出来的是HTML页面
dengdeng2015 + 1 + 1 用心讨论,共获提升!
星夜浪魂 + 1 + 1 鼓励转贴优秀软件安全工具和文档!
jsonK + 1 + 1 我很赞同!
鴻渊 + 1 + 1 谢谢@Thanks!
zhminxp + 1 + 1 谢谢@Thanks!
cuicuicui + 1 + 1 谢谢@Thanks!
dagonlau + 1 + 1 什么都可以解包么
痴念·D丿残骸 + 1 + 1 谢谢@Thanks!
lonznt + 1 + 1 谢谢@Thanks!
秒针 + 1 + 1 我很赞同!
zzzhulang + 1 + 1 我很赞同!
ugvnui + 1 主要还是需要还原wxml,wxss的文件有难度。
pj2016 + 1 谢谢@Thanks!
Hmily + 7 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
912662757 + 1 + 1 请问下怎么获取不了 .wxml
述说过去 + 1 + 1 热心回复!
vax6218 + 1 谢谢@Thanks!
SharsDela + 1 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
simonsu + 1 + 1 我很赞同!

查看全部评分

本帖被以下淘专辑推荐:

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

 楼主| psp7456 发表于 2018-1-10 23:37
华丽的复仇 发表于 2018-1-10 18:25
/data/data/com.tencent.mm/MicroMsg/{User}/appbrand/pkg
使用模拟器是否能够进入到该目录?

只要root了,真机也可访问。
 楼主| psp7456 发表于 2018-1-12 22:40
runfog 发表于 2018-1-12 19:03
用mfc写的gui程序,不会是这样的吧

你指程序大小还是界面美观程度?
vs2003老古董开发的,就这么小。
simonsu 发表于 2018-1-10 12:04
kesshei 发表于 2018-1-10 12:10
6666好东西。
SharsDela 发表于 2018-1-10 12:37
做一个打包更好啊
 楼主| psp7456 发表于 2018-1-10 12:39
SharsDela 发表于 2018-1-10 12:37
做一个打包更好啊

没必要打包吧?开发工具自动打包上传了。
当然,做是肯定能做,能解自然能打了~~
无言之城 发表于 2018-1-10 12:39
真赞,试试看效果怎么样
高龄幽灵 发表于 2018-1-10 13:09
程序小白   楼主这个是咋用的?
vr4u 发表于 2018-1-10 13:12
是不是将apk解包的?
3460875 发表于 2018-1-10 13:33
谢谢楼主分享

cxqdly 发表于 2018-1-10 16:50
解包用来做什么呢
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 提醒:禁止复制他人回复等『恶意灌水』行为,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-4-29 07:24

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表