勿求成品,支持正版
只用于学习交流,如有侵权,请联系本人删除
小程序逆向过程同上次
https://www.52pojie.cn/thread-1872067-1-1.html
破解逻辑
点击vip时不弹出付费信息
album.js -> queryAlbumTrackRecordsByPage
设置 e.playInfo.userPermission = true;
track.js -> queryMPTrackPage
if (u.data.trackDetailInfo) {
u.data.trackDetailInfo.playInfo.userPermission = true;
}
url 请求替换及解密
复制以前的 decrypt.js 到 common/utils
复制以前的 encrypt.js 到 packages/lite-player
复制以前的 miniprogram_npm/crypto-js 到相同位置
修改 link-protector.js 如下
加载解密所需 js
decrypt = require("../../common/utils/decrypt"), encrypt = require("./encrypt.js"), l = (encrypt.getEncryptedFileName,
encrypt.getEncryptedFileParams, n.isDevelopment ? "http://mpay.dev.test.ximalaya.com" : "https://mobile.ximalaya.com");
请求替换
url: t.isFree ? "".concat(l, "/mobile-playpage/track/v3/baseInfo/").concat(Date.now()) : 还是替换成之前抓包的url,这里强行跳转一波
解密替换
if(t.isFree) {
var c = l[0].url, u = (0, a.getSoundCryptLink)({
link: c,
deviceType: "wechatapp2"
});
t.src = u, n(t);
}
else {
var c = l[0].url;
t.src = (0, decrypt.decrypt)(c), n(t);
}
小程序打包成app
使用微信开发者工具的多端应用模式
QQ_1722407757726.png (403.2 KB, 下载次数: 0)
下载附件
2024-7-31 14:37 上传
解密所需文件,不知道为什么无法上传附件
decrypt.js
[color=]Object
.defineProperty(
[color=]exports
,
[color=]"__esModule"
, {
[color=]value
:
[color=]!
[color=]0
}),
[color=]exports
.
[color=]decrypt
[color=]=
[color=]void
[color=]0
;
[color=]var
[color=]e
[color=]=
require(
[color=]"crypto-js"
),
[color=]r
[color=]=
[color=]e
;
[color=]exports
.decrypt
[color=]=
[color=]function
(
[color=]t
) {
[color=]return
[color=]r
.
[color=]AES
.decrypt({
[color=]ciphertext
:
[color=]e
.
[color=]enc
.
[color=]Base64url
.parse(
[color=]t
)
},
[color=]r
.
[color=]enc
.
[color=]Hex
.parse(
[color=]"aaad3e4fd540b0f79dca95606e72bf93"
), {
[color=]mode
:
[color=]r
.
[color=]mode
.
[color=]ECB
,
[color=]padding
:
[color=]r
.
[color=]pad
.
[color=]Pkcs7
}).toString(
[color=]r
.
[color=]enc
.
[color=]Utf8
);
};
encrypt.js
[color=]var
r
[color=]=
require(
[color=]"../../@babel/runtime/helpers/slicedToArray"
);
[color=]function
t(
[color=]r
,
[color=]t
) {
[color=]for
(
[color=]var
[color=]e
,
[color=]n
[color=]=
[],
[color=]o
[color=]=
[color=]0
,
[color=]a
[color=]=
[color=]""
,
[color=]i
[color=]=
[color=]0
;
[color=]256
[color=]>
[color=]i
;
[color=]i
[color=]++
)
[color=]n
[
[color=]i
]
[color=]=
[color=]i
;
[color=]for
(
[color=]i
[color=]=
[color=]0
;
[color=]256
[color=]>
[color=]i
;
[color=]i
[color=]++
)
[color=]o
[color=]=
(
[color=]o
[color=]+
[color=]n
[
[color=]i
]
[color=]+
[color=]r
.charCodeAt(
[color=]i
[color=]%
[color=]r
.
[color=]length
))
[color=]%
[color=]256
,
[color=]e
[color=]=
[color=]n
[
[color=]i
],
[color=]n
[
[color=]i
]
[color=]=
[color=]n
[
[color=]o
],
[color=]n
[
[color=]o
]
[color=]=
[color=]e
;
[color=]for
(
[color=]var
[color=]h
[color=]=
[color=]o
[color=]=
[color=]i
[color=]=
[color=]0
;
[color=]h
[color=]t
.
[color=]length
;
[color=]h
[color=]++
)
[color=]o
[color=]=
(
[color=]o
[color=]+
[color=]n
[
[color=]i
[color=]=
(
[color=]i
[color=]+
[color=]1
)
[color=]%
[color=]256
])
[color=]%
[color=]256
,
[color=]e
[color=]=
[color=]n
[
[color=]i
],
[color=]n
[
[color=]i
]
[color=]=
[color=]n
[
[color=]o
],
[color=]n
[
[color=]o
]
[color=]=
[color=]e
,
[color=]a
[color=]+=
[color=]String
.fromCharCode(
[color=]t
.charCodeAt(
[color=]h
)
[color=]^
[color=]n
[(
[color=]n
[
[color=]i
]
[color=]+
[color=]n
[
[color=]o
])
[color=]%
[color=]256
]);
[color=]return
[color=]a
;
}
[color=]function
e(
[color=]r
) {
[color=]this
.
[color=]_randomSeed
[color=]=
[color=]r
,
[color=]this
.cg_hun();
}
[color=]e
.
[color=]prototype
[color=]=
{
cg_hun:
[color=]function
() {
[color=]this
.
[color=]_cgStr
[color=]=
[color=]""
;
[color=]var
[color=]r
[color=]=
[color=]"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/
[color=]\\
[color=]:._-1234567890"
,
[color=]t
[color=]=
[color=]r
.
[color=]length
,
[color=]e
[color=]=
[color=]0
;
[color=]for
(
[color=]e
[color=]=
[color=]0
;
[color=]e
[color=]t
;
[color=]e
[color=]++
) {
[color=]var
[color=]n
[color=]=
[color=]this
.ran()
[color=]*
[color=]r
.
[color=]length
,
[color=]o
[color=]=
parseInt(
[color=]n
);
[color=]this
.
[color=]_cgStr
[color=]+=
[color=]r
.charAt(
[color=]o
),
[color=]r
[color=]=
[color=]r
.split(
[color=]r
.charAt(
[color=]o
)).join(
[color=]""
);
}
},
cg_fun:
[color=]function
(
[color=]r
) {
[color=]r
[color=]=
[color=]r
.split(
[color=]"*"
);
[color=]var
[color=]t
[color=]=
[color=]""
,
[color=]e
[color=]=
[color=]0
;
[color=]for
(
[color=]e
[color=]=
[color=]0
;
[color=]e
[color=]r
.
[color=]length
[color=]-
[color=]1
;
[color=]e
[color=]++
)
[color=]t
[color=]+=
[color=]this
.
[color=]_cgStr
.charAt(
[color=]r
[
[color=]e
]);
[color=]return
[color=]t
;
},
ran:
[color=]function
() {
[color=]return
[color=]this
.
[color=]_randomSeed
[color=]=
(
[color=]211
[color=]*
[color=]this
.
[color=]_randomSeed
[color=]+
[color=]30031
)
[color=]%
[color=]65536
,
[color=]this
.
[color=]_randomSeed
[color=]/
[color=]65536
;
},
cg_decode:
[color=]function
(
[color=]r
) {
[color=]var
[color=]t
[color=]=
[color=]""
,
[color=]e
[color=]=
[color=]0
;
[color=]for
(
[color=]e
[color=]=
[color=]0
;
[color=]e
[color=]r
.
[color=]length
;
[color=]e
[color=]++
) {
[color=]var
[color=]n
[color=]=
[color=]r
.charAt(
[color=]e
),
[color=]o
[color=]=
[color=]this
.
[color=]_cgStr
.indexOf(
[color=]n
);
[color=]-
[color=]1
[color=]!==
[color=]o
[color=]&&
(
[color=]t
[color=]+=
[color=]o
[color=]+
[color=]"*"
);
}
[color=]return
[color=]t
;
}
};
[color=]var
[color=]n
[color=]=
t(
[color=]"xm"
,
[color=]"Ä[ÜJ=Û3Áf÷N"
),
[color=]o
[color=]=
[
[color=]19
,
[color=]1
,
[color=]4
,
[color=]7
,
[color=]30
,
[color=]14
,
[color=]28
,
[color=]8
,
[color=]24
,
[color=]17
,
[color=]6
,
[color=]35
,
[color=]34
,
[color=]16
,
[color=]9
,
[color=]10
,
[color=]13
,
[color=]22
,
[color=]32
,
[color=]29
,
[color=]31
,
[color=]21
,
[color=]18
,
[color=]3
,
[color=]2
,
[color=]23
,
[color=]25
,
[color=]27
,
[color=]11
,
[color=]20
,
[color=]5
,
[color=]15
,
[color=]12
,
[color=]0
,
[color=]33
,
[color=]26
];
[color=]module
.
[color=]exports
[color=]=
{
getEncryptedFileName:
[color=]function
(
[color=]r
,
[color=]t
) {
[color=]var
[color=]n
[color=]=
[color=]new
e(
[color=]r
).cg_fun(
[color=]t
);
[color=]return
[color=]"/"
[color=]===
[color=]n
[
[color=]0
]
[color=]?
[color=]n
[color=]:
[color=]"/"
.concat(
[color=]n
);
},
getEncryptedFileParams:
[color=]function
(
[color=]e
) {
[color=]var
[color=]a
[color=]=
t(
[color=]function
(
[color=]r
,
[color=]t
) {
[color=]for
(
[color=]var
[color=]e
[color=]=
[],
[color=]n
[color=]=
[color=]0
;
[color=]n
[color=]r
.
[color=]length
;
[color=]n
[color=]++
) {
[color=]for
(
[color=]var
[color=]o
[color=]=
[color=]"a"
[color=]r
[
[color=]n
]
[color=]&&
[color=]"z"
[color=]>=
[color=]r
[
[color=]n
]
[color=]?
[color=]r
[
[color=]n
].charCodeAt()
[color=]-
[color=]97
[color=]:
[color=]r
[
[color=]n
].charCodeAt()
[color=]-
[color=]"0"
.charCodeAt()
[color=]+
[color=]26
,
[color=]a
[color=]=
[color=]0
;
[color=]36
[color=]>
[color=]a
;
[color=]a
[color=]++
)
[color=]if
(
[color=]t
[
[color=]a
]
[color=]==
[color=]o
) {
[color=]o
[color=]=
[color=]a
;
[color=]break
;
}
[color=]e
[
[color=]n
]
[color=]=
[color=]25
[color=]o
[color=]?
[color=]String
.fromCharCode(
[color=]o
[color=]-
[color=]26
[color=]+
[color=]"0"
.charCodeAt())
[color=]:
[color=]String
.fromCharCode(
[color=]o
[color=]+
[color=]97
);
}
[color=]return
[color=]e
.join(
[color=]""
);
}(
[color=]"d"
[color=]+
[color=]n
[color=]+
[color=]"9"
,
[color=]o
),
[color=]function
(
[color=]r
) {
[color=]if
(
[color=]!
[color=]r
)
[color=]return
[color=]""
;
[color=]var
[color=]t
,
[color=]e
,
[color=]n
,
[color=]o
,
[color=]a
,
[color=]i
[color=]=
[
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]62
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]63
,
[color=]52
,
[color=]53
,
[color=]54
,
[color=]55
,
[color=]56
,
[color=]57
,
[color=]58
,
[color=]59
,
[color=]60
,
[color=]61
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]0
,
[color=]1
,
[color=]2
,
[color=]3
,
[color=]4
,
[color=]5
,
[color=]6
,
[color=]7
,
[color=]8
,
[color=]9
,
[color=]10
,
[color=]11
,
[color=]12
,
[color=]13
,
[color=]14
,
[color=]15
,
[color=]16
,
[color=]17
,
[color=]18
,
[color=]19
,
[color=]20
,
[color=]21
,
[color=]22
,
[color=]23
,
[color=]24
,
[color=]25
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]26
,
[color=]27
,
[color=]28
,
[color=]29
,
[color=]30
,
[color=]31
,
[color=]32
,
[color=]33
,
[color=]34
,
[color=]35
,
[color=]36
,
[color=]37
,
[color=]38
,
[color=]39
,
[color=]40
,
[color=]41
,
[color=]42
,
[color=]43
,
[color=]44
,
[color=]45
,
[color=]46
,
[color=]47
,
[color=]48
,
[color=]49
,
[color=]50
,
[color=]51
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
,
[color=]-
[color=]1
];
[color=]for
(
[color=]o
[color=]=
(
[color=]r
[color=]=
[color=]r
.toString()).
[color=]length
,
[color=]n
[color=]=
[color=]0
,
[color=]a
[color=]=
[color=]""
;
[color=]n
[color=]o
; ) {
[color=]do
{
[color=]t
[color=]=
[color=]i
[
[color=]255
[color=]&
[color=]r
.charCodeAt(
[color=]n
[color=]++
)];
}
[color=]while
(
[color=]n
[color=]o
[color=]&&
[color=]-
[color=]1
[color=]==
[color=]t
);
[color=]if
(
[color=]-
[color=]1
[color=]==
[color=]t
)
[color=]break
;
[color=]do
{
[color=]e
[color=]=
[color=]i
[
[color=]255
[color=]&
[color=]r
.charCodeAt(
[color=]n
[color=]++
)];
}
[color=]while
(
[color=]n
[color=]o
[color=]&&
[color=]-
[color=]1
[color=]==
[color=]e
);
[color=]if
(
[color=]-
[color=]1
[color=]==
[color=]e
)
[color=]break
;
[color=]a
[color=]+=
[color=]String
.fromCharCode(
[color=]t
[color=]2
[color=]|
(
[color=]48
[color=]&
[color=]e
)
[color=]>>
[color=]4
);
[color=]do
{
[color=]if
(
[color=]61
[color=]==
(
[color=]t
[color=]=
[color=]255
[color=]&
[color=]r
.charCodeAt(
[color=]n
[color=]++
)))
[color=]return
[color=]a
;
[color=]t
[color=]=
[color=]i
[
[color=]t
];
}
[color=]while
(
[color=]n
[color=]o
[color=]&&
[color=]-
[color=]1
[color=]==
[color=]t
);
[color=]if
(
[color=]-
[color=]1
[color=]==
[color=]t
)
[color=]break
;
[color=]a
[color=]+=
[color=]String
.fromCharCode((
[color=]15
[color=]&
[color=]e
)
[color=]4
[color=]|
(
[color=]60
[color=]&
[color=]t
)
[color=]>>
[color=]2
);
[color=]do
{
[color=]if
(
[color=]61
[color=]==
(
[color=]e
[color=]=
[color=]255
[color=]&
[color=]r
.charCodeAt(
[color=]n
[color=]++
)))
[color=]return
[color=]a
;
[color=]e
[color=]=
[color=]i
[
[color=]e
];
}
[color=]while
(
[color=]n
[color=]o
[color=]&&
[color=]-
[color=]1
[color=]==
[color=]e
);
[color=]if
(
[color=]-
[color=]1
[color=]==
[color=]e
)
[color=]break
;
[color=]a
[color=]+=
[color=]String
.fromCharCode((
[color=]3
[color=]&
[color=]t
)
[color=]6
[color=]|
[color=]e
);
}
[color=]return
[color=]a
;
}(
[color=]e
)).split(
[color=]"-"
),
[color=]i
[color=]=
r(
[color=]a
,
[color=]4
),
[color=]h
[color=]=
[color=]i
[
[color=]0
];
[color=]return
{
[color=]sign
:
[color=]i
[
[color=]1
],
[color=]buy_key
:
[color=]h
,
[color=]token
:
[color=]i
[
[color=]2
],
[color=]timestamp
:
[color=]i
[
[color=]3
]
};
}
};