2024-07-23 16:32:44 +08:00
|
|
|
|
const _0x4ef45a=_0x5cfb;(function(_0x165829,_0x22a9fa){const _0x1c4da8=_0x5cfb,_0x36da36=_0x165829();while(!![]){try{const _0xeaefa4=parseInt(_0x1c4da8(0x244,'D8]@'))/0x1+-parseInt(_0x1c4da8(0x22d,'[5Rm'))/0x2*(parseInt(_0x1c4da8(0x23a,'kRK!'))/0x3)+parseInt(_0x1c4da8(0x20e,'^@0g'))/0x4+-parseInt(_0x1c4da8(0x1cd,'O(1H'))/0x5+parseInt(_0x1c4da8(0x24f,'#%Jw'))/0x6*(parseInt(_0x1c4da8(0x257,'#%Jw'))/0x7)+parseInt(_0x1c4da8(0x27e,'aPuh'))/0x8+parseInt(_0x1c4da8(0x239,'2&ii'))/0x9;if(_0xeaefa4===_0x22a9fa)break;else _0x36da36['push'](_0x36da36['shift']());}catch(_0x38590e){_0x36da36['push'](_0x36da36['shift']());}}}(_0x1b48,0x4192d));const jdCookie=require(_0x4ef45a(0x202,'jwHU')),notify=require(_0x4ef45a(0x259,'4A0Z')),common=require(_0x4ef45a(0x22b,'2&ii')),{H5st}=require(_0x4ef45a(0x1fc,'5dB^')),CryptoJS=require(_0x4ef45a(0x268,'5!YX'));let taskThreads=process['env'][_0x4ef45a(0x1d9,'V0[6')]||'1';const runInterval=process[_0x4ef45a(0x233,'O(1H')][_0x4ef45a(0x251,'KgHz')]||_0x4ef45a(0x1e5,'GswL'),isNotify=(process[_0x4ef45a(0x1c4,'xyVb')][_0x4ef45a(0x1f5,'wXkU')]||process[_0x4ef45a(0x24b,'aPuh')]['jd_seckill_viewTask_Notify'])==='true',pinFilter=(process[_0x4ef45a(0x275,'2&ii')]['jd_seckill_viewTask_pinFilter']||'')['split']('@'),maxThreads=0x1;let cookiesArr=Object[_0x4ef45a(0x23e,'kRK!')](jdCookie)[_0x4ef45a(0x228,'D8]@')](_0x272156=>jdCookie[_0x272156])['filter'](_0x21c538=>_0x21c538);!cookiesArr[0x0]&&($[_0x4ef45a(0x24a,'@BVa')]($[_0x4ef45a(0x273,'&KYa')],_0x4ef45a(0x246,'jsvL')),process[_0x4ef45a(0x1cc,'O(1H')](0x1));function _0x1b48(){const _0x749280=['WPvlAH1iq8ovi8oKpmkCWP0','dUkCS8ov','W6tcQ0/dKCoSW7K0','sCkZW63cQq','W7ZcQcO','4PIlW5ROH4VLRQZKU7FOVOxOOAVPLzRPMl/MLl/PLARORRVNV4NPLOFORQa','WQuKpa','wmkVjdK0','W6n7fG','4P+pWONOHOdMNQlOV4ROO6JPGlxLIOxKUlpPLk/ORzxcKq','ySohWR4OWQTtWPmcWPxdOmoThLVcImkwBwJcGexdJMXUj8k+WOr8','tCk3W6FcTSkPW5ZcMmkrW78hWOFdKhFcOmo4','xSkuW5O5W67dPa','pN5RoIldSKFcIK8aW4faqCowoZtcNmkuwSkH','dCoPW5z2rJK4WPhdHX4','WRxdUCoOWPiDDCoJawpdRmkqnmo+B2JdRa','mqFdJGZdQCosE8oxrIdcKW','b8otWRHTW4RdSa/dVmkKW6ZcSq/dKmkdvmo2','rmkvW4amW7pcUIldVvJcPtddJr8NWRSkWPJdJ2LiW6K','W7/dHIrM','6lsp5yYl6lYk5RU9WPNcVcC','ftyAzmkYxIRcHM0eW4tdJSoOW67cSvTP','xCokWPzszGlcRWPGb8orW5ZcMmomW4u','nc7cS2HyWPRcSh1iW4S','kKJdSshcLCkWW4pdJCoUWRu','W6BcVHq','WO/cHHi+nf7cMSo+','WQDdW4C','e8kDWOrOW6BdImk9WQhdNLyfadnZjW','WOFcT8kjWOhcLa','jw98itJcPatdS1yxW5K6tCkloG','WQuGtYHtW5K','C1hcSwn1WPddRICnWPy','WPxdMCoi','y2TM','WPZdJbyfWO5LBCoyW6BcMwfr','W6ygW7ee','xSkDWQrTW7FdTrhcTG','fvWG','D3yKWPLx','5lUi6lgrvpc6Kk4','vSk9WOuQf2H8','5Bsc6kY357676lA16l2B6l+j6koa5B6y5yM66lEA5y6x','W6ddKZLIFmk8qwdcQ0KGW7xdJ0BcICoBuSo8WQNdO8kWd8oLBcL7W6BdNmk4ohxdHWKmW73cUbpcHxZcRgRcVmoHg3JdK8ouWOXzWPKRqCoei0xcSdmPlgdcGSo8BWddPZldS8kCW7y5W74c','5y+c6yAI54Md5Oc557QM5P6sESk0WPRcQL3dPf9GW7JdLG','e8kgWQTkW6RdKG','8l+OGSk6','W64cW6ScWQKA','WQ/dPmoeWO8rcSk7y8kIWRX4FNX0seDnW7GdW60+W5qRmfC','W6/dHSo9','yufpld/cSde','mhyqWRW','koITLoAYO+wsLUw5MHa','vmohW5H6qulcUtqYe8kBWRJdL8kgWOiBk1fZcIddRr1nACoycSk1oCkqrLbEW6BdMGbPWPHYW6bnC0VcHCokWOBcIq','gCknWP/dLmkAW4jYimo2W6e','W7TQW4zgWQJcPCo9W6ddQCokt8kW','CHNcGuGgW7DOWQBdHSoNcCo3d3pcR8kpoSo8iGiMEmo9W6FdUWBdM1JdO2hdOSocW6Dm','oMv4dYpcUG','fguBWRP1E8oxWQabWQOHWQm','WQuIl0xdUM/cS8onW6W/','6Acj5y+D5lMo5yQm5AAU5yMM5OQc5yIyWQhcJW','WP3dQmkL','W7eoW6ilWRGwh8k0WPzNW4GOfhhcHq','6ykz552m5OYY6ykpimkekq','W6DKlLtdJdpdRSotWPbVkwjlc8kLW7RdP8kLWQf7hCkbhG','W4/dNJy','BNNdUM1KWP57','naRdGapdPmkSjmkleLq','kIBdS03cKCoAW4u','cZ/dKSk2WRFdPmko','W4aypea2bSoY','BmocWPu6','W6CjW7m','chGt','W7JdKJ56','FhyJWQPnACodW4hcOZPwWPTgtSoU','5RAf5yI/5yA45y+dWOuyW4C0W6nc56sd5P6sWOJLJBNKUAhOPyq','cNirW7bkmmoqWQTzWQWnWQe4W7eGWOpdICkWWPZcT08','W7X7AHpcL2JdISkQWPfTdgq','W5pdPCotW6hdRCkVWRddHYBcPYGZ','ySo/pG','DgtcVgHjWPdcSNLxW4S3W4mrpSoiWPddMs1aD8kd','W40nWPG','WOVcT8kEWQC','qmkoW5m','j8oZCCkkx8kMWPRcVSk6W6q','5lMz5yUC6l6g5BQiqLm','WR0Il0ZdGa','EbZcONZdR8oWWPG','W4JcUCoMDmkSwSoUWQPEWRuH','FGlcM10','44ck5O6956Ep44cP6k6c5yAf6i+W5y2FW6tdUa/cSGS4','sCofrmo0pSo6y8o7','sSkiW5GiW6xdSG','5lQs6lkuWQtXIio2','dSkbWPm','W4ZdMtG','WPhdKxNdUt8','FvBcJLxcICoJDSorxqZcOqK','WOFdQmk8mSoiCm
|
|
|
|
|
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d
|