system-cpu / wxappUnpacker

基于node反编译小程序 已经配置完成
GNU General Public License v3.0
482 stars 270 forks source link

Magic number is not correct! #5

Open halohsu opened 1 year ago

halohsu commented 1 year ago

node /Users/bluemiaomiao/Developer/wxappUnpacker/wuWxapkg.js Unpack file /Users/bluemiaomiao/Downloads/15.wxapkg...

Header info: firstMark: 0x7f unknownInfo: 2325094700 infoListLength: 2344130302 dataLength: 454421007 lastMark: 0xec /Users/bluemiaomiao/Developer/wxappUnpacker/wuWxapkg.js:21 if (firstMark != 0xbe || lastMark != 0xed) throw Error("Magic number is not correct!"); ^

Error: Magic number is not correct! at header (/Users/bluemiaomiao/Developer/wxappUnpacker/wuWxapkg.js:21:54) at /Users/bluemiaomiao/Developer/wxappUnpacker/wuWxapkg.js:186:44 at /Users/bluemiaomiao/Developer/wxappUnpacker/wuLib.js:103:14 at agent (/Users/bluemiaomiao/Developer/wxappUnpacker/wuLib.js:66:23) at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)

Node.js v18.15.0

liudonghua123 commented 1 year ago

The same problems here.

D:\code\node\WxAppUnpacker>node wuWxapkg.js "D:\Documents\WeChat Files\Applet\wx281ef5d197a494f0\30\_js_.wxapkg"
Unpack file D:\Documents\WeChat Files\Applet\wx281ef5d197a494f0\30\_js_.wxapkg...

Header info:
  firstMark: 0x56
  unknownInfo:  827149655
  infoListLength:  1476964515
  dataLength:  2136477909
  lastMark: 0xf8
D:\code\node\WxAppUnpacker\wuWxapkg.js:21
    if (firstMark != 0xbe || lastMark != 0xed) throw Error("Magic number is not correct!");
                                               ^

Error: Magic number is not correct!
    at header (D:\code\node\WxAppUnpacker\wuWxapkg.js:21:54)
    at D:\code\node\WxAppUnpacker\wuWxapkg.js:186:44
    at D:\code\node\WxAppUnpacker\wuLib.js:95:14
    at agent (D:\code\node\WxAppUnpacker\wuLib.js:64:23)
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)

Node.js v18.14.2

D:\code\node\WxAppUnpacker>
liudonghua123 commented 1 year ago

I need to decrypt the wxapkg file using https://github.com/maotoumao/wxpc-miniprogram-decryption/blob/master/wxmd.js firstly, then use bingo.bat or node wuWxapkg.js.

see more details on https://blog.csdn.net/weixin_45473555/article/details/111055673, https://blog.csdn.net/yeyiqun/article/details/109172556.