|
|
|
|
var _0xodh='jsjiami.com.v7';const _0x973458=_0x2f24;function _0x4009(){const _0x5dbd9a=(function(){return[...[_0xodh,'KMIjuTsNjIyigOaqmPMiE.necoemE.AWtv7nhRWP==','WOiNW6FcKmoWWR4rWQW','eHlcRSo1oq','DCouWPddUXO','W6lcGHyrW5fi','uSkEWRGyCa','ff1YWPFdNG','hg4Vxa','W7zFW60','i3WWWRag','WQa7Bq','mCorBmkY','WPfECsLmWRZcJgW9','W74asCobF8oCWPpdVwKJnHtdQ8o6WQ/dRa','mYNcSZNcNa','h3jo','vmkPvK1q','fJpcSmonoq','WPvOcCkAW5u','BKddKG','W7G1umoHza','ce4RWPa3bgKh','WObEF8omW4tdUW','qItcMSkwa2i','tdpcJCkRxwqJW7ddSti','W53dKIOnvq','WRHgaG','cxLaWRH2nmo7mCk/t8oNrW','nCoUE0a+','srZcR8kWba','aXWhWR3cIa','pZqi','WPGcBmkdW7y','WPbqza','W7ruW68','iuGvpmky','lg5vWR7dM8kkW7jTWOeTW7a','W5H8W5W','iW/cPHdcRq','cmoKsfqw','uci2ySkD','W645kSkyW58','g3jDWQzYmSo3lq','WRXifCkoW5TNeSkkWObWfSoyW4hcMSoywW','ptdcSq','xcvsW4DrW7xcHL7dKSo+','ah9wW6z8W74','WPXezG','5O+356wS57I75P6ettHYWQtcUMOsB8o+wW','kSoKWRe','cgW4wX7dMdJcPr8','jG/cUq/cOa','fMmjiSowWOWGW4DUW5qaWPpdHKvMrd0','4P+CwUw8RowlM+wiVowkJEw2KEI/UUwkJ+AoH+wUSUwjGowkIUs6GEAxUU++PEMbGEweUE+/JG','c0rBW7z8','ixi0fSku','yHdcQmk1ySkyWRfJaYm','xZ3cNCkpga','ibRcPqG','W5FcKGGmW7G','tZFcMmkRcueMW77dJZjdiSkpd07dNq','jvfzWOv5','W5fHW4NcKmo3CW','AX7cRmkWca','W70UCa','DNVcTMublvWum8ocWQy','fCkRtmkFhgnQ','gf1rW4Tc','W4pcLGexW58','gLq4WRie','WRaTtSoNWPS','W6D1W63cSCoV','gZJcJ8omhG','tmovWQ3dMry','WRqbBSo5WPTlW5LBwW','x0hdGdRcGCkQla','gHhcPSo1kq','DGLmnCoS','wNPdW6ZcGa','dCoMx1aN','WRfexmoLW6q','a35GWRTp','W5eutCoExq','eSoRamkNA8oyWRDEevFdGG','4P+5h+wkQUwlMEAiUEwjH8o8xG','W681amktW6S','DSkSWRO','hCkbWPaGW7m','eCoShmkjBmow','oZxcTmofgG','aqpdSuldOmonW4awlN9irq','cJawdSom','WQuHW6ZcP8oqWRS','BSkLW78HpW','fmoqWOxdMSkBWOZdISkysaZcGSkLimolDuddQG','WPxdLCkNWOXZvrVcK8k2W6i','mv8yFWe','WOKIDCopWPS','W4mrCmoPqG','fmoyWQZdL8oL','hMtdNCoTnMqBW5RdSZe','WPBcUmkNW51KW65+yX/dTYZdImosW57dPSoAnCkMW6G','W6JcGqyUW68','tKNdLqZcQW','tJbn','W4JcIsuPW6m','W7BcKbGSW77dGG0Neq','CtFdIeNdQSo0zSkk','f8kAvCkmma','WQnHxColW5W','W5PWW5xcPGy','W6DRW7tcS8o8','g3XzWQz5gCoMm8k0rCoVuG','W6S1nmkQW6C','W5nyW7JcQmoo','tmk2AhHP','WR4XbSoZW7K','laNdIdHf','m0BcLmkZqSk5WQzl','W7uZy8oIq33dGq','h8kYWQ8bW7q','W71+WQJdImkuW7v2','xqtdSe3dUmokW5eFugDvv8o7r8ksAKfNW5fWW5ddQIhdPZRcISoDW6RdOLWSW5hdHCkPbCkuW6BdHM3dPwRcKSkzW4ZcGmk4W6OEkSkWW5pcISkmWPJcISowySoMhCkFFg3dPf8hvrdcIxVdQ1tcNCkDAq','WQOodCo/W7TXcIldHG','eSo3aSkWESod','W5X2W5FcRCoQyCkw','ch9TW7zd','fwG4qXtdKIBcUrW','kIWHWOpcTq','WOugwCoYWPm','tflcQHJcR8kvWOqHgvXorSkT','pqVcPaqr','W5ddTSkXW5HZW4LJBtJdVg/dImoSW5JdRCox','WO4QC8oVWR0','B1ZdKG','bCoRwfa','W6lcO8oeW79mDHm','sZfEo8o3WRBcKSoxlLldHW','fCk7tSkogNG','vCkiW4a3ceDjla','4P2nW63MN6dLOipLHP/MJ5tLR5ZKUzRMLjRLJA7PH7VVVBFPUQNOR5tLHApOVR3LIR/LI6a','c8kNrSksd3LTW7jKoY9H','q8k+W7K6cq','t2NdNd5W','fmkuWOWGW6zenq','WPxdOJy','pgqqWQeu','WPGiWRCR','c3KMqqu','qZhcJCkV','W6hdUmkWW6bp','W63dV8k2W7jB','W51+WQJdImkuW7vw5B+j5AwN44kC5lMB5lUN6lwj5y+K','jwSdkSkD','WOWgWRaSxx7cNfruas8','gxGqiSkdW6GTW4vaW5CmWOi','zG3cUq','4P+gFEw3PEwJU+wgS+AmN+wSQowkQEwkTowoUoMhR++/Vow8TowLQ+wkOowiUSoUWRO','WR/dJGBcSqybzq','qI5vjmkFW6KXW4Da','BNJdHtzB','nmoMWRxdQCoS','W57cMGWWW40','hSkuWOS','lCozvmkWla','pKj8W4HQ','yX/cKSk2zG','zNddGZFdRq','4O6477MWW7BOTzRLJkpdQmoOWOhOJlxLJ6BLIiRLI4dKVQhMGkG','i8kaWRyQW4q','WROFsCo1WQC','WQGlEW','rcPen8orWRRcJmomaKxcJG','jhawk8kw','uZ3cTSkmCW','gCo6v8kgna','WQWbCmo6WPPqW7O','s8kcW5eXmW','aCkmW6hcTePSWRWXbIKoWOtcQq','p8oFCCk9','CmkkW6OUga','WPZdVYpcVJai','W5ere8kTW4u','ytbNomoR','r2vvlSoiW5b3W545W4rwWPVcLXv2','jCoFA8kN','WQOUw8oHWOa','igLDWRRdNCkZW5q','kIldVYnioKe7h8oTWQaC','WQmpkSodW4q','a2Wof8kuW4G','WQGvnmoqW7m','DxddKrddOq','AftdSJ3cJa','WOOBWQWswMS','W7iVbSkMW4O','WOpdUatcPHi','rCkgW6CI','zmkODMv8'],...(function(){return[...['kJFdUYncraDZnCoMWRykcCoEwmkRWOJdTgCzn8k9W4ZdUZFcHtmPWPxcO8oKzaldPmkJtmoC','xSoPf8kqp1L4W7vu','W5BdRseMBW','eCkfWOSJW7qzF8kBWPHCW5FdHSktWOOYkSkECKKRW4hcP8k6WOG','b0L+WPhdRSk0W4rBWQOlW6lcTSkeWONcMtCbW6ldNa','DZzClCoj','hMvF','nJFcHHdcJa','W7eYDmoOsG','ymoQWQBdGmobxaaIkSkvWO7dQ8k1E8kxnZuQwmkeo8kWW61xAc1GW4xdMmkhW5tcOwNcK2nwjCoOjav+W7ldNWldJIGwWP54amk9oHFcUG','jfVcIa','thFdOr/cLW','ouKRpmkE','WQaswSo+WQu','W5ddGsC/qG','WP07WRuOuW','hgG+sq','WOmxW6Vc
|
2024-06-28 07:47:44 +00:00
|
|
|
|
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
|