全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1078|回复: 9
打印 上一主题 下一主题

[美国VPS] 有偿找人帮解密一个JS文件

[复制链接]
跳转到指定楼层
1#
发表于 2024-3-31 00:53:25 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
推荐
发表于 2024-3-31 13:09:10 | 只看该作者
完整版本

https://privatebin.net/?0938698d662043d1#Dqm5Grj5WnbivHyDcy8hH4mCLvxT59SB83TmA4z665kc
2#
发表于 2024-3-31 01:45:28 | 只看该作者
恕我直言,不太像是人能干的事情(
如果不是刚需,建议定需求重新写一个比破解这个简单
3#
发表于 2024-3-31 01:49:50 来自手机 | 只看该作者
这个js主要实现什么功能的?
4#
发表于 2024-3-31 01:50:44 | 只看该作者
用https://obf-io.deobfuscate.io/初步过了一下。
https://privatebin.net/?35ec9254cf6d0524#3PA8AH6ZVY3cJR3JkrnVzUodiSvf9zKd4jqmZgwX7W2J
5#
发表于 2024-3-31 13:06:44 | 只看该作者
在楼上的基础上完善了下

  1. function base64ToHex(base64String) {
  2.     const decodedString = atob(base64String);
  3.     let hexString = '';
  4.     for (let i = 0; i < decodedString.length; i++) {
  5.         const hexValue = decodedString.charCodeAt(i).toString(16);
  6.         hexString += hexValue.length === 2 ? hexValue : '0' + hexValue;
  7.     }
  8.     return hexString.toUpperCase();
  9. }

  10. function shuffle(array) {
  11.     let arrayLength = array.length;
  12.     for (let i = 0; i < arrayLength; i++) {
  13.         let lastElementIndex = arrayLength - 1;
  14.         let randomIndex = Math.random() * (lastElementIndex + 1) >> 0;
  15.         let temp = array[lastElementIndex];
  16.         array[lastElementIndex] = array[randomIndex];
  17.         array[randomIndex] = temp;
  18.     }
  19.     return array;
  20. }

  21. function dealM3u8(videoElement, videoUrl, videoPlayer) {
  22.     const request = new XMLHttpRequest();
  23.     videoUrl = videoUrl.replace("www.bde4.cc", document.domain).replace("https:", location.protocol);
  24.     request.responseType = "arraybuffer";
  25.     request.open("GET", videoUrl, true);
  26.     request.onload = function (event) {
  27.         const response = request.response;
  28.         let byteArray = new Uint8Array(response);
  29.         byteArray = byteArray.slice(3354);
  30.         const decompressedData = pako.inflate(byteArray);
  31.         let decodedString = '';
  32.         let index;
  33.         for (index = 0; index < decompressedData.length / 16384; index++) {
  34.             decodedString += String.fromCharCode.apply(null, decompressedData.slice(index * 16384, (index + 1) * 16384));
  35.         }
  36.         decodedString += String.fromCharCode.apply(null, decompressedData.slice(index * 16384));
  37.         decodedString = decodedString.replace(/.*?\.ts/g, "https://vod.bdys.me/$&");
  38.         const isNewVideo = !!(videoElement.src == '');
  39.         videoElement.src = "data:application/vnd.apple.mpegurl;base64," + btoa(decodedString);
  40.         if (Hls.isSupported()) {
  41.             if (videoPlayer.hls) { } else {
  42.                 const hlsConfig = {
  43.                     autoStartLoad: true,
  44.                     startFragPrefetch: true,
  45.                     maxBufferLength: 0x12c
  46.                 };
  47.                 videoPlayer.hls = new Hls(hlsConfig);
  48.             }
  49.             videoPlayer.hls.loadSource(videoElement.src);
  50.             videoPlayer.hls.attachMedia(videoElement);
  51.             videoPlayer.once("url", () => hls.destroy());
  52.             videoPlayer.once("destroy", () => hls.destroy());
  53.         } else {
  54.             videoPlayer.notice.show = "浏览器不支持m3u8播放!";
  55.         }
  56.         if (!isNewVideo) {
  57.             videoPlayer.play();
  58.         }
  59.     };
  60.     request.send();
  61. }

  62. function error(message) {
  63.     const toastOptions = {
  64.         text: message,
  65.         position: "mid-center",
  66.         icon: "error",
  67.         loader: false,
  68.         stack: false
  69.     };
  70.     $.toast(toastOptions);
  71. }

  72. let lines = [];
  73. let playLines = [];

  74. function dealUrl(videoData) {
  75.     if (videoData.url.indexOf("handler") > 0) {
  76.         videoData.url += '/' + new Date().getTime() + ".mp4";
  77.     }
  78.     videoData.url = videoData.url.replace("?rkey", new Date().getTime() + ".mp4?ver=6010&rkey");
  79.     if (videoData.url.indexOf("bde4.cc") > 0) {
  80.         videoData.url = videoData.url.replace("ftn_handler/", new Date().getTime() + ".mp4?rkey=").replace("bde4.cc", "weiyun.com");
  81.     }
  82.     return videoData.url;
  83. }

  84. function updatePlayLines(newUrl) {
  85.     for (const playLine of playLines) {
  86.         if (playLine.url.indexOf("/god/") > 0) {
  87.             if ((newUrl.indexOf("/tos/") > 0 && playLine.url.indexOf("type") > 0) || (newUrl.indexOf("/tos/") < 0 && playLine.url.indexOf("type") < 0)) {
  88.                 playLine.url = newUrl;
  89.             }
  90.         }
  91.     }
  92. }

  93. function getUrl(verifyCode, videoPlayer) {
  94.     let videoUrl = null;
  95.     const timestamp = new Date().getTime();
  96.     const key = CryptoJS.enc.Utf8.parse(md5(pid + '-' + timestamp).substring(0, 16));
  97.     const encryptedKey = CryptoJS.AES.encrypt(pid + '-' + timestamp, key, {
  98.         'mode': CryptoJS.mode.ECB,
  99.         'padding': CryptoJS.pad.Pkcs7
  100.     });
  101.     $.ajax("/god/" + pid + (verifyCode === 888 ? "?type=1" : ''), {
  102.         'method': "POST",
  103.         'dataType': "json",
  104.         'data': {
  105.             't': timestamp,
  106.             'sg': base64ToHex(encryptedKey + ''),
  107.             'verifyCode': verifyCode
  108.         },
  109.         'success': function (response) {
  110.             if (response.url != null) {
  111.                 if (verifyCode !== 888) {
  112.                     videoUrl = dealUrl(response);
  113.                 } else {
  114.                     videoUrl = response.url;
  115.                 }
  116.                 updatePlayLines(videoUrl);
  117.                 videoPlayer.video.src = response.url;
  118.             } else {
  119.                 showError(response.error);
  120.             }
  121.         }
  122.     });
  123.     return videoUrl;
  124. }

  125. (function () {
  126.     const getGlobalObject = function () {
  127.         let globalObject;
  128.         try {
  129.             globalObject = Function("return (function() {}.constructor("return this")( ));")();
  130.         } catch (error) {
  131.             globalObject = window;
  132.         }
  133.         return globalObject;
  134.     };
  135.     const globalObject = getGlobalObject();
  136.     globalObject.setInterval(checkDebugger, 4000);
  137. })();
  138. function switch2(videoIndex, videoUrl, videoPlayer) {
  139.     if (videoUrl.indexOf("type") < 0) {
  140.         if (time != null && new Date().getTime() - time < 86400000) {
  141.             showError("距离发布未超过24小时不予开放!");
  142.             return;
  143.         }
  144.         if (!window.member && IsPC()) {
  145.             showError("暂不开放!");
  146.             return;
  147.         }
  148.     }
  149.     if (playLines.length > 1 && videoUrl.indexOf("type") < 0) {
  150.         $("#aaa").attr("src", "/play/verifyCode?t=" + new Date().getTime());
  151.         $("#myModal").modal("show");
  152.         return;
  153.     }
  154.     getUrl(playLines.length == 1 && videoUrl.indexOf("type") < 0 ? 666 : 888, videoPlayer);
  155. }
复制代码
7#
发表于 2024-3-31 13:31:11 | 只看该作者
又在玩什么?
8#
发表于 2024-3-31 14:12:25 | 只看该作者
5ks 发表于 2024-3-31 13:06
在楼上的基础上完善了下

大佬帮忙看看我的 https://sunk.eu.org/thread-1290148-1-1.html
9#
发表于 2024-3-31 14:14:14 | 只看该作者
本帖最后由 lc0-b6 于 2024-4-3 00:05 编辑

这不bdys的js吗
10#
 楼主| 发表于 2024-3-31 15:06:23 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-11-11 03:21 , Processed in 0.073209 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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