某e通的m3u8文件解密
菜鸡一个,研究某利威失败,就找个网站研究一下重拾信心,然后看到有人说某e通的m3u8加密了,然后就研究了一下感觉没有任何难度
直接搜索 就可以找到解密的位置,我就不贴图了
跟进去之后有个L函数,调试了一下,32位,应该是md5,那就随便找个md5调戏一下,结果一致,
那就复制粘贴,本地调戏,把L替换成md5,完事,然后发现最后面的 k.decode 要解码 u,感觉u像base64
然后本地调戏和他k.decode对比下,一样,那就替换成 atob 搞定
懒汉一个,就不贴图了
appid 是网址最前面那个app开头的字符串
注意,仅做学习使用,不要乱搞,乱搞我不负责
```
function r(r, n) {
var t = (65535 & r) + (65535 & n);
return (r >> 16) + (n >> 16) + (t >> 16) << 16 | 65535 & t;
}
function n(n, t, e, u, o, c) {
return r((f = r(r(t, n), r(u, c))) << (a = o) | f >>> 32 - a, e);
var f, a;
}
function t(r, t, e, u, o, c, f) {
return n(t & e | ~t & u, r, t, o, c, f);
}
function e(r, t, e, u, o, c, f) {
return n(t & u | e & ~u, r, t, o, c, f);
}
function u(r, t, e, u, o, c, f) {
return n(t ^ e ^ u, r, t, o, c, f);
}
function o(r, t, e, u, o, c, f) {
return n(e ^ (t | ~u), r, t, o, c, f);
}
function c(n) {
for (var c = 1732584193, f = -271733879, a = -1732584194, i = 271733878, h = 0; h < n.length; h += 16) {
var l = c, v = f, g = a, d = i;
c = t(c, f, a, i, n, 7, -680876936), i = t(i, c, f, a, n, 12, -389564586),
a = t(a, i, c, f, n, 17, 606105819), f = t(f, a, i, c, n, 22, -1044525330),
c = t(c, f, a, i, n, 7, -176418897), i = t(i, c, f, a, n, 12, 1200080426),
a = t(a, i, c, f, n, 17, -1473231341), f = t(f, a, i, c, n, 22, -45705983),
c = t(c, f, a, i, n, 7, 1770035416), i = t(i, c, f, a, n, 12, -1958414417),
a = t(a, i, c, f, n, 17, -42063), f = t(f, a, i, c, n, 22, -1990404162),
c = t(c, f, a, i, n, 7, 1804603682), i = t(i, c, f, a, n, 12, -40341101),
a = t(a, i, c, f, n, 17, -1502002290), c = e(c, f = t(f, a, i, c, n, 22, 1236535329), a, i, n, 5, -165796510),
i = e(i, c, f, a, n, 9, -1069501632), a = e(a, i, c, f, n, 14, 643717713),
f = e(f, a, i, c, n, 20, -373897302), c = e(c, f, a, i, n, 5, -701558691),
i = e(i, c, f, a, n, 9, 38016083), a = e(a, i, c, f, n, 14, -660478335),
f = e(f, a, i, c, n, 20, -405537848), c = e(c, f, a, i, n, 5, 568446438),
i = e(i, c, f, a, n, 9, -1019803690), a = e(a, i, c, f, n, 14, -187363961),
f = e(f, a, i, c, n, 20, 1163531501), c = e(c, f, a, i, n, 5, -1444681467),
i = e(i, c, f, a, n, 9, -51403784), a = e(a, i, c, f, n, 14, 1735328473),
c = u(c, f = e(f, a, i, c, n, 20, -1926607734), a, i, n, 4, -378558),
i = u(i, c, f, a, n, 11, -2022574463), a = u(a, i, c, f, n, 16, 1839030562),
f = u(f, a, i, c, n, 23, -35309556), c = u(c, f, a, i, n, 4, -1530992060),
i = u(i, c, f, a, n, 11, 1272893353), a = u(a, i, c, f, n, 16, -155497632),
f = u(f, a, i, c, n, 23, -1094730640), c = u(c, f, a, i, n, 4, 681279174),
i = u(i, c, f, a, n, 11, -358537222), a = u(a, i, c, f, n, 16, -722521979),
f = u(f, a, i, c, n, 23, 76029189), c = u(c, f, a, i, n, 4, -640364487),
i = u(i, c, f, a, n, 11, -421815835), a = u(a, i, c, f, n, 16, 530742520),
c = o(c, f = u(f, a, i, c, n, 23, -995338651), a, i, n, 6, -198630844),
i = o(i, c, f, a, n, 10, 1126891415), a = o(a, i, c, f, n, 15, -1416354905),
f = o(f, a, i, c, n, 21, -57434055), c = o(c, f, a, i, n, 6, 1700485571),
i = o(i, c, f, a, n, 10, -1894986606), a = o(a, i, c, f, n, 15, -1051523),
f = o(f, a, i, c, n, 21, -2054922799), c = o(c, f, a, i, n, 6, 1873313359),
i = o(i, c, f, a, n, 10, -30611744), a = o(a, i, c, f, n, 15, -1560198380),
f = o(f, a, i, c, n, 21, 1309151649), c = o(c, f, a, i, n, 6, -145523070),
i = o(i, c, f, a, n, 10, -1120210379), a = o(a, i, c, f, n, 15, 718787259),
f = o(f, a, i, c, n, 21, -343485551), c = r(c, l), f = r(f, v), a = r(a, g),
i = r(i, d);
}
return [ c, f, a, i ];
}
function f(r) {
for (var n = "", t = 0; t < 4 * r.length; t++) n += "0123456789abcdef".charAt(r >> t % 4 * 8 + 4 & 15) + "0123456789abcdef".charAt(r >> t % 4 * 8 & 15);
return n;
}
function a(r) {
for (var n = 1 + (r.length + 8 >> 6), t = new Array(16 * n), e = 0; e < 16 * n; e++) t = 0;
for (e = 0; e < r.length; e++) t |= (255 & r.charCodeAt(e)) << e % 4 * 8;
return t |= 128 << e % 4 * 8, t = 8 * r.length, t;
}
function hexMD5(r){
return f(c(a(r)));
}
function Strdecode(t) {
var e = arguments.length > 1 && void 0 !== arguments ? arguments : "appbgzjnopv1917";
e = hexMD5(e);
var r = 3
, n = +(t = decodeURIComponent(t)).substr(-r)
, i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
, a = i.split("").reduce((function(t, e, r) {
return t = r,
t
}
), {})
, o = t
, s = i.indexOf(o)
, c = hexMD5(e + o).substr(s % 8, s % 8 + 7).split("").map((function(t) {
return t.charCodeAt()
}
));
t = t.substr(1, t.length - r - 1);
for (var u = "", l = 0, f = 0, h = 0; h < t.length; h++) {
for (f = f == c.length ? 0 : f,
l = a] - f - c; l < 0; )
l += 65;
u += i,
n && (u += t.slice(h + 1, h + 1 + n),
h += n)
}
return atob(u)
}
function Decode(encodeString,appid){
return Strdecode(encodeString.substring("".length,encodeString.length),appid)
}
``` qnmdwapj 发表于 2023-9-15 00:16
虽然不明所以,但看起来很有用的样子~~
我怎么感觉你这个用户名有点针对性呢{:1_918:} 要不继续研究某利威,我也被难住了,没找到相似的案例 飘渺云水间 发表于 2023-9-14 18:16
大佬不需要看,小白看不懂!
看不懂就别看了,没必要,有这时间搞两把游戏多舒坦 本帖最后由 熊猫拍板砖 于 2023-9-16 21:57 编辑
w460270218 发表于 2023-9-16 20:56
你都没试就说不可能,我这边亲测是可以下载的。
ts文件本来就是流媒体文件,还有,ts文件还要分加密和不加密两种,你改成m3u8就解密了,那可是真牛
m3u8文件只是存放ts链接的,所以,为啥要多此一举?你直接下载ts文件就行,为啥还要改名?
还有,你那下载是一个ts切片,其它的呢?你要把所有的视频播放一遍才能找到全部ts文件切片 你辛苦了,,,, 感谢分享! 看不太懂啊,谢谢分享 谢谢@Thanks!
cbkxh 发表于 2023-9-14 17:43
看不太懂啊,谢谢分享
大佬不需要看,小白看不懂! 你辛苦了 表示完全看不懂