全球主机交流论坛
标题:
有偿找人帮解密一个JS文件
[打印本页]
作者:
BackDoor
时间:
2024-3-31 00:53
提示:
作者被禁止或删除 内容自动屏蔽
作者:
karson
时间:
2024-3-31 01:45
恕我直言,不太像是人能干的事情(
如果不是刚需,建议定需求重新写一个比破解这个简单
作者:
全球话题
时间:
2024-3-31 01:49
这个js主要实现什么功能的?
作者:
poe
时间:
2024-3-31 01:50
用https://obf-io.deobfuscate.io/初步过了一下。
https://privatebin.net/?35ec9254cf6d0524#3PA8AH6ZVY3cJR3JkrnVzUodiSvf9zKd4jqmZgwX7W2J
作者:
5ks
时间:
2024-3-31 13:06
在楼上的基础上完善了下
function base64ToHex(base64String) {
const decodedString = atob(base64String);
let hexString = '';
for (let i = 0; i < decodedString.length; i++) {
const hexValue = decodedString.charCodeAt(i).toString(16);
hexString += hexValue.length === 2 ? hexValue : '0' + hexValue;
}
return hexString.toUpperCase();
}
function shuffle(array) {
let arrayLength = array.length;
for (let i = 0; i < arrayLength; i++) {
let lastElementIndex = arrayLength - 1;
let randomIndex = Math.random() * (lastElementIndex + 1) >> 0;
let temp = array[lastElementIndex];
array[lastElementIndex] = array[randomIndex];
array[randomIndex] = temp;
}
return array;
}
function dealM3u8(videoElement, videoUrl, videoPlayer) {
const request = new XMLHttpRequest();
videoUrl = videoUrl.replace("www.bde4.cc", document.domain).replace("https:", location.protocol);
request.responseType = "arraybuffer";
request.open("GET", videoUrl, true);
request.onload = function (event) {
const response = request.response;
let byteArray = new Uint8Array(response);
byteArray = byteArray.slice(3354);
const decompressedData = pako.inflate(byteArray);
let decodedString = '';
let index;
for (index = 0; index < decompressedData.length / 16384; index++) {
decodedString += String.fromCharCode.apply(null, decompressedData.slice(index * 16384, (index + 1) * 16384));
}
decodedString += String.fromCharCode.apply(null, decompressedData.slice(index * 16384));
decodedString = decodedString.replace(/.*?\.ts/g, "https://vod.bdys.me/$&");
const isNewVideo = !!(videoElement.src == '');
videoElement.src = "data:application/vnd.apple.mpegurl;base64," + btoa(decodedString);
if (Hls.isSupported()) {
if (videoPlayer.hls) { } else {
const hlsConfig = {
autoStartLoad: true,
startFragPrefetch: true,
maxBufferLength: 0x12c
};
videoPlayer.hls = new Hls(hlsConfig);
}
videoPlayer.hls.loadSource(videoElement.src);
videoPlayer.hls.attachMedia(videoElement);
videoPlayer.once("url", () => hls.destroy());
videoPlayer.once("destroy", () => hls.destroy());
} else {
videoPlayer.notice.show = "浏览器不支持m3u8播放!";
}
if (!isNewVideo) {
videoPlayer.play();
}
};
request.send();
}
function error(message) {
const toastOptions = {
text: message,
position: "mid-center",
icon: "error",
loader: false,
stack: false
};
$.toast(toastOptions);
}
let lines = [];
let playLines = [];
function dealUrl(videoData) {
if (videoData.url.indexOf("handler") > 0) {
videoData.url += '/' + new Date().getTime() + ".mp4";
}
videoData.url = videoData.url.replace("?rkey", new Date().getTime() + ".mp4?ver=6010&rkey");
if (videoData.url.indexOf("bde4.cc") > 0) {
videoData.url = videoData.url.replace("ftn_handler/", new Date().getTime() + ".mp4?rkey=").replace("bde4.cc", "weiyun.com");
}
return videoData.url;
}
function updatePlayLines(newUrl) {
for (const playLine of playLines) {
if (playLine.url.indexOf("/god/") > 0) {
if ((newUrl.indexOf("/tos/") > 0 && playLine.url.indexOf("type") > 0) || (newUrl.indexOf("/tos/") < 0 && playLine.url.indexOf("type") < 0)) {
playLine.url = newUrl;
}
}
}
}
function getUrl(verifyCode, videoPlayer) {
let videoUrl = null;
const timestamp = new Date().getTime();
const key = CryptoJS.enc.Utf8.parse(md5(pid + '-' + timestamp).substring(0, 16));
const encryptedKey = CryptoJS.AES.encrypt(pid + '-' + timestamp, key, {
'mode': CryptoJS.mode.ECB,
'padding': CryptoJS.pad.Pkcs7
});
$.ajax("/god/" + pid + (verifyCode === 888 ? "?type=1" : ''), {
'method': "POST",
'dataType': "json",
'data': {
't': timestamp,
'sg': base64ToHex(encryptedKey + ''),
'verifyCode': verifyCode
},
'success': function (response) {
if (response.url != null) {
if (verifyCode !== 888) {
videoUrl = dealUrl(response);
} else {
videoUrl = response.url;
}
updatePlayLines(videoUrl);
videoPlayer.video.src = response.url;
} else {
showError(response.error);
}
}
});
return videoUrl;
}
(function () {
const getGlobalObject = function () {
let globalObject;
try {
globalObject = Function("return (function() {}.constructor("return this")( ));")();
} catch (error) {
globalObject = window;
}
return globalObject;
};
const globalObject = getGlobalObject();
globalObject.setInterval(checkDebugger, 4000);
})();
function switch2(videoIndex, videoUrl, videoPlayer) {
if (videoUrl.indexOf("type") < 0) {
if (time != null && new Date().getTime() - time < 86400000) {
showError("距离发布未超过24小时不予开放!");
return;
}
if (!window.member && IsPC()) {
showError("暂不开放!");
return;
}
}
if (playLines.length > 1 && videoUrl.indexOf("type") < 0) {
$("#aaa").attr("src", "/play/verifyCode?t=" + new Date().getTime());
$("#myModal").modal("show");
return;
}
getUrl(playLines.length == 1 && videoUrl.indexOf("type") < 0 ? 666 : 888, videoPlayer);
}
复制代码
作者:
5ks
时间:
2024-3-31 13:09
完整版本
https://privatebin.net/?0938698d662043d1#Dqm5Grj5WnbivHyDcy8hH4mCLvxT59SB83TmA4z665kc
作者:
1tv
时间:
2024-3-31 13:31
又在玩什么?
作者:
MasterCard
时间:
2024-3-31 14:12
5ks 发表于 2024-3-31 13:06
在楼上的基础上完善了下
大佬帮忙看看我的
https://sunk.eu.org/thread-1290148-1-1.html
作者:
lc0-b6
时间:
2024-3-31 14:14
本帖最后由 lc0-b6 于 2024-4-3 00:05 编辑
这不bdys的js吗
作者:
BackDoor
时间:
2024-3-31 15:06
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 全球主机交流论坛 (https://sunk.eu.org/)
Powered by Discuz! X3.4