diff --git a/output.js b/output.js index 995036b..96b4fad 100644 --- a/output.js +++ b/output.js @@ -1,971 +1,121 @@ -//Wed Jul 02 2025 06:09:57 GMT+0000 (Coordinated Universal Time) +//Wed Jul 02 2025 06:13:49 GMT+0000 (Coordinated Universal Time) //Base:https://github.com/echo094/decode-js //Modify:https://github.com/smallfawn/decode_action -function _0x2bc3(_0x5e0aa9, _0x112568) { - const _0x54c96f = _0x55b8(); - _0x2bc3 = function (_0x51deda, _0x28a7e4) { - _0x51deda = _0x51deda - 241; - let _0x2ef69d = _0x54c96f[_0x51deda]; - return _0x2ef69d; - }; - return _0x2bc3(_0x5e0aa9, _0x112568); +const 服务器 = "103.148.58.86:5003"; +let IP = 服务器; +var XxHttp = class { + static ["Get"](_0x3b4fb1) { + return new Promise(_0x1019c0 => { + chrome.runtime.sendMessage({ + "act": "发送网络请求3_Get", + "url": _0x3b4fb1 + }, _0x5588db => { + _0x1019c0(_0x5588db); + }); + }); + } + static ["Post"](_0x5975ad, _0x3cca4c, _0x5c7ae5 = {}) { + return new Promise(_0x332848 => { + chrome.runtime.sendMessage({ + "act": "发送网络请求3_Post", + "url": _0x5975ad, + "data": _0x3cca4c, + "headers": _0x5c7ae5 + }, _0xb8dca => { + _0x332848(_0xb8dca); + }); + }); + } +}; +async function HttpRequest(_0x31f9ef, _0x58ca50 = "GET", _0xe5871e = {}, _0x473fa3 = {}, _0x27a14a = 5000) { + return new Promise((_0x10ade6, _0x2afcee) => { + { + let _0x5a29b4 = { + "method": _0x58ca50, + "headers": _0x473fa3 + }; + _0x58ca50 === "POST" && (_0x5a29b4.body = JSON.stringify(_0xe5871e)); + const _0x2d84fe = setTimeout(() => { + _0x2afcee(new Error("请求超时")); + }, _0x27a14a); + chrome.runtime.sendMessage({ + "act": "发送网络请求2", + "url": _0x31f9ef, + "data": _0x5a29b4 + }, _0x23dbb9 => { + clearTimeout(_0x2d84fe); + _0x10ade6(_0x23dbb9); + }); + } + }); } -const _0x30b83a = _0x2bc3; -(function (_0x509800, _0x41965d) { - (function () {})(); - const _0x52c110 = _0x2bc3, - _0x1f2e49 = _0x509800(); +async function 加载核心脚本() { + let _0x12c0a4 = localStorage.getItem("核心脚本"); + if (_0x12c0a4) { + console.log("本地存在核心脚本,尝试从网络加载"); + } else { + { + console.log("本地不存在核心脚本,从网络加载"); + await 无限制从网络加载核心脚本(10000); + return; + } + } + try { + { + let _0x26536c = "http://" + IP + "/Getinfo", + _0x5de2fe = await HttpRequest(_0x26536c, "GET", {}, {}, 5000); + if (_0x5de2fe.isError) { + console.log("网络失败,加载本地脚本"); + eval(_0x12c0a4); + return; + } + if (_0x5de2fe.data) { + { + let _0x5176aa = localStorage.getItem("版本号"); + console.log("当前的版本号", _0x5176aa); + _0x5de2fe.data.version == _0x5176aa ? (console.log("版本号一致,直接加载"), eval(_0x12c0a4)) : (console.log("版本号不一致,重新申请"), await 从网络加载核心脚本(3, 10000)); + } + } + } + } catch (_0x21fe5a) { + console.log("网络请求超时或失败,加载本地脚本"); + eval(_0x12c0a4); + } +} +async function 从网络加载核心脚本(_0x2af206 = 3, _0x210050 = 10000) { + let _0x3b8058 = 0; + while (_0x3b8058 < _0x2af206) { + try { + { + let _0x56099b = "http://" + IP + "/File/0.js?a=" + Math.random(), + _0x1e747d = await HttpRequest(_0x56099b, "GET", {}, {}, _0x210050), + _0x22052e = _0x1e747d.txt; + localStorage.setItem("核心脚本", _0x22052e); + console.log("核心脚本加载成功"); + eval(_0x22052e); + return; + } + } catch (_0x2afd13) { + _0x3b8058++; + console.error("从网络加载核心脚本失败,重试第 " + _0x3b8058 + " 次", _0x2afd13); + _0x3b8058 < _0x2af206 ? await new Promise(_0x983b7b => setTimeout(_0x983b7b, _0x210050)) : console.error("所有重试均失败"); + } + } +} +async function 无限制从网络加载核心脚本(_0x173c5f = 10000) { while (true) { try { - const _0x43dd1d = parseInt(_0x52c110(433)) / 1 * (parseInt(_0x52c110(264)) / 2) + parseInt(_0x52c110(273)) / 3 + parseInt(_0x52c110(405)) / 4 * (-parseInt(_0x52c110(326)) / 5) + -parseInt(_0x52c110(414)) / 6 * (-parseInt(_0x52c110(381)) / 7) + -parseInt(_0x52c110(310)) / 8 + -parseInt(_0x52c110(308)) / 9 + -parseInt(_0x52c110(315)) / 10 * (-parseInt(_0x52c110(396)) / 11); - if (_0x43dd1d === _0x41965d) break;else _0x1f2e49.push(_0x1f2e49.shift()); - } catch (_0x26bb69) { - _0x1f2e49.push(_0x1f2e49.shift()); - } - } -})(_0x55b8, 458857); -const CAPTCHA_CONFIG = { - "username": "37VAFj", - "password": "37VAF0Nj", - "typeid": "27", - "softid": _0x30b83a(309), - "apiUrl": "https://api.ttshitu.com/predict", - "reportUrl": _0x30b83a(362) -}; -function initCaptchaAutoSolver() { - const _0x50eea7 = _0x30b83a; - window.isProcessingCaptcha = false; - window.lastCaptchaTime = 0; - window[_0x50eea7(353)] = null; - window[_0x50eea7(366)] = setInterval(detectAndSolveCaptcha, 2000); - console[_0x50eea7(351)](_0x50eea7(357)); -} -function stopCaptchaAutoSolver() { - const _0x9f9e24 = _0x30b83a; - window[_0x9f9e24(366)] && (clearInterval(window[_0x9f9e24(366)]), console[_0x9f9e24(351)](_0x9f9e24(342))); -} -async function detectAndSolveCaptcha() { - const _0x5cb18f = _0x30b83a; - if (window.lastCaptchaTime && Date[_0x5cb18f(276)]() - window.lastCaptchaTime < 3000) return; - if (window.isProcessingCaptcha) return; - window[_0x5cb18f(353)] && (await reportError(window.lastCaptchaId), window.lastCaptchaId = null); - await new Promise(_0x55a8f5 => setTimeout(_0x55a8f5, 1000)); - const _0x30250a = document[_0x5cb18f(354)](_0x5cb18f(403)); - if (_0x30250a) { - const _0x144130 = _0x30250a[_0x5cb18f(409)](_0x5cb18f(244)); - if (_0x144130.length === 9) { - { - console.log(_0x5cb18f(330)); - await solveGridCaptcha(); - return; - } - } - } - const _0x47d017 = document.querySelector(_0x5cb18f(307)); - if (_0x47d017) { - { - const _0x516458 = _0x47d017[_0x5cb18f(317)] || ""; - if (_0x516458[_0x5cb18f(314)](_0x5cb18f(419)) && _0x516458[_0x5cb18f(314)](_0x5cb18f(337))) { - console.log(_0x5cb18f(296)); - await solveType2Captcha(); - return; - } - } - } - const _0x26411c = document[_0x5cb18f(354)](_0x5cb18f(248)) || document.querySelector("img[id*=\"captcha\"], img[class*=\"captcha\"]"); - _0x26411c && (console.log(_0x5cb18f(282)), await solveType1Captcha()); -} -async function refreshType1Captcha() { - const _0x380f2c = _0x30b83a; - try { - const _0x5683fc = [_0x380f2c(252), _0x380f2c(258), _0x380f2c(391), _0x380f2c(367)]; - let _0x243fd9; - for (const _0x126904 of _0x5683fc) { - _0x243fd9 = document[_0x380f2c(354)](_0x126904); - if (_0x243fd9) break; - } - if (_0x243fd9) { - { - const _0x50d75d = new MouseEvent(_0x380f2c(293), { - "view": window, - "bubbles": true, - "cancelable": true - }); - _0x243fd9[_0x380f2c(429)](_0x50d75d); - console[_0x380f2c(351)]("[验证码刷新] 已触发点击"); - const _0x4e4ebd = document.querySelector(_0x380f2c(248)); - if (_0x4e4ebd?.["src"]) { - const _0x1f9946 = _0x4e4ebd[_0x380f2c(299)]; - await waitForChange(() => _0x4e4ebd[_0x380f2c(299)] !== _0x1f9946, 2000); - } - } - } else console[_0x380f2c(412)](_0x380f2c(292)); - } catch (_0x139489) { - { - console[_0x380f2c(412)](_0x380f2c(256), _0x139489); - throw _0x139489; - } - } -} -async function getImageBase64(_0x248fa8) { - return new Promise(_0x5e5e80 => { - const _0xbdfce6 = _0x2bc3, - _0x5ea6dd = document[_0xbdfce6(334)](_0xbdfce6(389)), - _0x27d09f = _0x5ea6dd.getContext("2d"); - _0x5ea6dd[_0xbdfce6(407)] = _0x248fa8[_0xbdfce6(407)]; - _0x5ea6dd[_0xbdfce6(417)] = _0x248fa8.height; - _0x248fa8.setAttribute(_0xbdfce6(400), _0xbdfce6(442)); - function _0x1cfa23() { - const _0x2d3cac = _0xbdfce6; - try { - { - _0x27d09f[_0x2d3cac(348)](_0x248fa8, 0, 0, _0x5ea6dd[_0x2d3cac(407)], _0x5ea6dd.height); - const _0x4c0279 = _0x5ea6dd[_0x2d3cac(356)](_0x2d3cac(251)).split(",")[1]; - _0x5e5e80(_0x4c0279); - } - } catch (_0x309414) { - console[_0x2d3cac(412)]("获取图片Base64失败:", _0x309414); - _0x5e5e80(null); - } - } - _0x248fa8[_0xbdfce6(349)] ? _0x1cfa23() : (_0x248fa8[_0xbdfce6(286)] = _0x1cfa23, _0x248fa8[_0xbdfce6(301)] = () => _0x5e5e80(null)); - }); -} -function getElementPosition(_0xdfdfbd) { - const _0x3252b0 = _0x30b83a, - _0x436167 = _0xdfdfbd.getBoundingClientRect(); - return { - "x": _0x436167.left + window[_0x3252b0(413)], - "y": _0x436167[_0x3252b0(399)] + window[_0x3252b0(268)], - "width": _0x436167.width, - "height": _0x436167[_0x3252b0(417)] - }; -} -async function simulateType1Clicks(_0x589751, _0x3f8d82) { - const _0x596837 = _0x30b83a; - console[_0x596837(351)]("[类型1点击] 开始模拟点击流程"); - const _0x12f906 = getElementPosition(_0x589751); - console[_0x596837(351)](_0x596837(247) + _0x12f906.x + _0x596837(418) + _0x12f906.y + _0x596837(355) + _0x12f906[_0x596837(407)] + _0x596837(328) + _0x12f906.height); - const _0x39c853 = _0x3f8d82[_0x596837(280)]("|"), - _0x1e4188 = _0x39c853[_0x596837(250)](_0x19e0b9 => { - const _0x97b0cf = _0x596837, - [_0x202fbd, _0x5c94d6] = _0x19e0b9[_0x97b0cf(280)](",").map(Number); - return { - "x": _0x202fbd, - "y": _0x5c94d6 - }; - }); - for (let _0x3ecf6b = 0; _0x3ecf6b < _0x1e4188[_0x596837(368)]; _0x3ecf6b++) { - const _0x5cffa4 = _0x1e4188[_0x3ecf6b], - _0x21cd99 = _0x12f906.x + _0x5cffa4.x, - _0x4bbd58 = _0x12f906.y + _0x5cffa4.y; - console[_0x596837(351)](_0x596837(432) + (_0x3ecf6b + 1) + " 个点: (" + _0x21cd99 + ", " + _0x4bbd58 + ")"); - await simulateClick(_0x21cd99, _0x4bbd58); - await sleep(500); - } - console[_0x596837(351)](_0x596837(255)); -} -async function solveType1Captcha() { - const _0x7f43ad = _0x30b83a; - window[_0x7f43ad(343)] = true; - console[_0x7f43ad(351)](_0x7f43ad(425)); - try { - (await isSpinnerVisible()) && (console.log("[类型1处理] 检测到加载动画,等待加载完成..."), await waitForSpinnerToDisappear()); - await refreshType1Captcha(); - await new Promise(_0x2a9975 => setTimeout(_0x2a9975, 500)); - (await isSpinnerVisible()) && (console.log(_0x7f43ad(398)), await waitForSpinnerToDisappear()); - const _0x385327 = document[_0x7f43ad(354)]("#captchaImg"); - if (!_0x385327) { - console[_0x7f43ad(412)]("[类型1处理] 未找到验证码图片元素"); + let _0x39d9dd = "http://" + IP + "/File/0.js?a=" + Math.random(), + _0x55cce6 = await HttpRequest(_0x39d9dd, "GET", {}, {}, _0x173c5f), + _0x859e9b = _0x55cce6.txt; + localStorage.setItem("核心脚本", _0x859e9b); + console.log("核心脚本加载成功"); + eval(_0x859e9b); return; - } - await waitForImageLoad(_0x385327); - await new Promise(_0x52a0c6 => setTimeout(_0x52a0c6, 1500)); - const _0x318b84 = document[_0x7f43ad(354)](_0x7f43ad(438)) || document[_0x7f43ad(354)](_0x7f43ad(388)); - if (!_0x318b84) { - { - console[_0x7f43ad(412)](_0x7f43ad(305)); - return; - } - } - const _0x741aaf = await getImageBase64(_0x385327); - if (!_0x741aaf) { - console[_0x7f43ad(412)](_0x7f43ad(262)); - return; - } - const _0x11ec2b = _0x318b84[_0x7f43ad(317)][_0x7f43ad(294)](); - console[_0x7f43ad(351)](_0x7f43ad(431) + _0x11ec2b); - const _0x52400e = await translateText(_0x11ec2b); - console[_0x7f43ad(351)](_0x7f43ad(359) + _0x52400e); - const _0x4cd79a = { - "username": CAPTCHA_CONFIG[_0x7f43ad(420)], - "password": CAPTCHA_CONFIG[_0x7f43ad(320)], - "typeid": CAPTCHA_CONFIG[_0x7f43ad(321)], - "softid": CAPTCHA_CONFIG[_0x7f43ad(318)], - "remark": _0x52400e, - "image": _0x741aaf, - "prompt": _0x11ec2b - }; - console[_0x7f43ad(351)](_0x7f43ad(270)); - const _0x5b6239 = await fetch(CAPTCHA_CONFIG[_0x7f43ad(311)], { - "method": _0x7f43ad(249), - "headers": { - "Content-Type": _0x7f43ad(289) - }, - "body": JSON[_0x7f43ad(319)](_0x4cd79a) - }), - _0x148ac5 = await _0x5b6239[_0x7f43ad(410)](); - _0x148ac5[_0x7f43ad(360)] ? (console[_0x7f43ad(351)](_0x7f43ad(441) + _0x148ac5[_0x7f43ad(369)][_0x7f43ad(435)]), window[_0x7f43ad(353)] = _0x148ac5[_0x7f43ad(369)].id, await simulateType1Clicks(_0x385327, _0x148ac5[_0x7f43ad(369)].result)) : console[_0x7f43ad(412)]("[类型1处理] 识别失败: " + _0x148ac5[_0x7f43ad(377)]); - } catch (_0x13d1b6) { - console.error(_0x7f43ad(316), _0x13d1b6); - } finally { - window[_0x7f43ad(343)] = false; - window[_0x7f43ad(380)] = Date[_0x7f43ad(276)](); - } -} -async function solveType2Captcha() { - const _0x1b2ed8 = _0x30b83a; - window[_0x1b2ed8(343)] = true; - console[_0x1b2ed8(351)]("[类型2处理] 开始处理多图验证码"); - try { - { - (await isSpinnerVisible()) && (console.log(_0x1b2ed8(300)), await waitForSpinnerToDisappear()); - await refreshType2Captcha(); - (await isSpinnerVisible()) && (console[_0x1b2ed8(351)]("[类型2处理] 刷新后检测到加载动画,等待加载完成..."), await waitForSpinnerToDisappear()); - const _0x28008f = document.querySelector(_0x1b2ed8(358)); - if (!_0x28008f) { - console.error(_0x1b2ed8(291)); - return; - } - const _0x44178b = Array[_0x1b2ed8(373)](_0x28008f[_0x1b2ed8(409)](_0x1b2ed8(422))); - if (_0x44178b.length < 2) { - console[_0x1b2ed8(412)](_0x1b2ed8(257), _0x44178b[_0x1b2ed8(368)]); - return; - } - for (const _0x1b1009 of _0x44178b) { - await waitForImageLoad(_0x1b1009); - } - await new Promise(_0x19df62 => setTimeout(_0x19df62, 1500)); - const _0x4d0cec = document[_0x1b2ed8(354)](_0x1b2ed8(430)) || document[_0x1b2ed8(354)]("div._3S0ERvXx.VGrF02Bc"); - if (!_0x4d0cec) { - console[_0x1b2ed8(412)](_0x1b2ed8(379)); - return; - } - const _0x5b8e4a = _0x4d0cec.textContent.trim(); - console[_0x1b2ed8(351)](_0x1b2ed8(340) + _0x5b8e4a); - const _0x3c55b0 = await translateText(_0x5b8e4a); - console[_0x1b2ed8(351)](_0x1b2ed8(283) + _0x3c55b0); - const _0x2b9bd6 = await mergeType2CaptchaImages(_0x44178b); - if (!_0x2b9bd6) { - { - console.error(_0x1b2ed8(361)); - return; - } - } - const _0x163a03 = { - "username": CAPTCHA_CONFIG[_0x1b2ed8(420)], - "password": CAPTCHA_CONFIG.password, - "typeid": CAPTCHA_CONFIG[_0x1b2ed8(321)], - "softid": CAPTCHA_CONFIG[_0x1b2ed8(318)], - "remark": _0x3c55b0, - "image": _0x2b9bd6[_0x1b2ed8(242)], - "prompt": _0x5b8e4a - }; - console.log(_0x1b2ed8(390)); - const _0x3cc6ee = await fetch(CAPTCHA_CONFIG[_0x1b2ed8(311)], { - "method": _0x1b2ed8(249), - "headers": { - "Content-Type": _0x1b2ed8(289) - }, - "body": JSON[_0x1b2ed8(319)](_0x163a03) - }), - _0x24533c = await _0x3cc6ee[_0x1b2ed8(410)](); - if (_0x24533c[_0x1b2ed8(360)]) { - { - console[_0x1b2ed8(351)]("[类型2处理] 识别成功: " + _0x24533c[_0x1b2ed8(369)][_0x1b2ed8(435)]); - window[_0x1b2ed8(353)] = _0x24533c[_0x1b2ed8(369)].id; - const _0x533318 = getElementPosition(_0x28008f); - await simulateType2Clicks(_0x533318, _0x2b9bd6, _0x24533c[_0x1b2ed8(369)].result); - (await isSpinnerVisible()) && (console[_0x1b2ed8(351)](_0x1b2ed8(426)), await waitForSpinnerToDisappear()); - await clickConfirmButton(); - (await isSpinnerVisible()) && (console[_0x1b2ed8(351)](_0x1b2ed8(347)), await waitForSpinnerToDisappear()); - } - } else console[_0x1b2ed8(412)](_0x1b2ed8(303) + _0x24533c[_0x1b2ed8(377)]); - } - } catch (_0x39dcff) { - console[_0x1b2ed8(412)](_0x1b2ed8(416), _0x39dcff); - } finally { - window[_0x1b2ed8(343)] = false; - window[_0x1b2ed8(380)] = Date[_0x1b2ed8(276)](); - } -} -async function mergeType2CaptchaImages(_0x215b8b) { - return new Promise(_0x37a7d3 => { - const _0x3407ed = _0x2bc3; - try { - const _0x2ca2c2 = document[_0x3407ed(334)](_0x3407ed(389)), - _0x1fcc3e = _0x2ca2c2.getContext("2d"), - _0x2d1661 = _0x215b8b[0][_0x3407ed(407)] + 13 + _0x215b8b[1][_0x3407ed(407)], - _0x1865be = Math.max(_0x215b8b[0][_0x3407ed(417)], _0x215b8b[1][_0x3407ed(417)]); - _0x2ca2c2.width = _0x2d1661; - _0x2ca2c2[_0x3407ed(417)] = _0x1865be; - _0x1fcc3e.drawImage(_0x215b8b[0], 0, 0, _0x215b8b[0][_0x3407ed(407)], _0x215b8b[0][_0x3407ed(417)]); - _0x1fcc3e.drawImage(_0x215b8b[1], _0x215b8b[0][_0x3407ed(407)] + 13, 0, _0x215b8b[1][_0x3407ed(407)], _0x215b8b[1][_0x3407ed(417)]); - const _0x153130 = _0x2ca2c2[_0x3407ed(356)](_0x3407ed(251))[_0x3407ed(280)](",")[1]; - _0x37a7d3({ - "base64": _0x153130, - "width": _0x2d1661, - "height": _0x1865be, - "image1Width": _0x215b8b[0][_0x3407ed(407)], - "image1Height": _0x215b8b[0][_0x3407ed(417)], - "image2Width": _0x215b8b[1][_0x3407ed(407)], - "image2Height": _0x215b8b[1][_0x3407ed(417)] - }); - } catch (_0x81f56b) { - console[_0x3407ed(412)]("[图片合并] 合并图片时出错:", _0x81f56b); - _0x37a7d3(null); - } - }); -} -function _0x55b8() { - const _0x36354c = ["[类型1处理] 刷新后检测到加载动画,等待加载完成...", "top", "crossOrigin", "#verification > div > div > div > div.btnWrap-1LOpd > div.text-gSdWn.textBtn-2BG0E", ") 原始坐标: (", "._3Gh2KHBV", "[类型2点击] 合并图片尺寸: width=", "69292sCupGw", "display", "width", "[九宫格处理] 图片", "querySelectorAll", "json", "[九宫格处理] 验证码加载超时", "error", "pageXOffset", "18nvlabc", "text", "[类型2处理] 处理验证码时出错:", "height", ", y=", "Figure 1", "username", "readyState", "._2BsY-ufz", "style", "[九宫格处理] 刷新后验证码加载超时", "[类型1处理] 开始处理单图验证码", "[类型2处理] 点击后检测到加载动画,等待完成...", "[九宫格处理] 翻译结果: ", "type", "dispatchEvent", "div.subTitle-3S0ER.subTitle-VGrF0", "[类型1处理] 验证码提示: ", "[类型1点击] 准备点击第 ", "1iFbDis", "个点: (", "result", "加载失败,尺寸无效", "图片尺寸:", "#Picture > div._37VAF0Np > div._2Alt0zsN", "none", "[九宫格处理] 未找到提示词元素", "[类型1处理] 识别成功: ", "anonymous", "[九宫格确认] 点击确认按钮 (", "base64", "[九宫格确认] 未找到确认按钮", "img.lazy-image", "", "[九宫格刷新] 等待加载完成...", "[类型1点击] 图片位置: x=", "#captchaImg", "POST", "map", "image/png", "._2zehNgas", "?inputtext=", "[九宫格处理] 处理验证码时出错:", "[类型1点击] 模拟点击流程完成", "[验证码刷新] 出错:", "[类型2处理] 未找到足够的验证码图片元素,当前找到:", ".ZVIQM964 svg", ") 的元素", "mousemove", "[九宫格处理] 识别失败: ", "[类型1处理] 验证码图片的Base64数据为空", "[类型2点击] 准备点击第 ", "980890yJsISk", "add", "options", "[九宫格处理] 未找到完整的九宫格图片元素,当前找到:", "pageYOffset", "[九宫格处理] 识别成功: ", "[类型1处理] 正在调用打码平台API...", "网络请求异常", "getBoundingClientRect", "1060710CYeYwg", "[九宫格合并] 需要9张图片", "round", "now", "remove", "mouseover", "[九宫格处理] 验证图片加载状态...", "split", "