2024-09-02 15:17:27 +00:00
|
|
|
var _0xodK='jsjiami.com.v7';const _0x480660=_0x1c83;function _0x4f6d(){const _0x27f273=(function(){return[...[_0xodK,'gUXujdksjuYiDNamiNU.cToEKAmV.Bv7wBqDVfMd==','EtpcJCkuW6O','xCokqa','dmoPWQTNBW','efrs','WQtcNSk1CCkG','W5/dQHbTW5O','WQLBb1im','CbOvWQ4B','W4ZcUaS','WOhdK8kq','aIZdNxnFWPNdKW','W4FcSHJcLmotat0','W5ZdG8oZWPjp','DCopW7BdHmoxmG','W4a9W4TbW7G','W60GBSo2oq','h2JdSq','W5SMzmkrn8ogWQZcH8krsSkzamkuW5TBzCkg','W4uPE8km','WRRdICoDWPtdGG','cCoefCo7WRO','uHXlcGC','WPZdKCk5W4HT','WPXDl0uW','WR9Xp1W','vN3cPCkysa','sSo0W6ldV8od','WP4cj8k7WQ/cSEw1HEwNRUAxJZ/dLIm','W60YW4jbW58','WQ3dMmoEbgPTWPldRHm','5lMI5lIr6ls25y+I','W5NcOWdcKSo3','WQiHW7PJbW','W4CpW6KmWPtdQdG','nCkKWQC','WR4pkSkDWPC','WRddU8oCd2u','hhbuWOlcOq','W4GazCk3iq','WOaPvmklWObOWPVdJab5WO7dTmoslCk4','EmodW6pdGW','uSokq8o/','oSoeWQJcRColWQNdLa','W4VdLGL4WOC','tsu1WRS6','oCkKWRxcTCk6W7NdIG','jCouWOJcKmoJ','Eb5L','W5ddMJP6W6NcQ8kQW4W','ddhdH2jaW4/cHCohfSkQWO3dSmomW5K+icpcOcOKo07dI0jreXv6W6GuWPBcM8ouDSkpemoSic7dUmk9WOaynmoTcCoiW7CoWO/dR8ozzmoIW4xcJ8ophG','WOxcICkN','WPSOW71so8oHW5fhfa','CmokW5/dQmoQ','W64ErmoVmq','wmows8o1WRS3kW','e3zEWRhcVW','WQSmiCkyWPm','W5JcISkHWRLiD2xdJW','WRjoWPKxWP3dNmo3lXz7WO8','WR/dNmokg1O','W7JcMWldJSkB','kbxcJXxdMHjP','gWZcR8kwvq','W67dVt19W68','WRJdMCotaMPC','tUEUI+w9Na','EWGwWOG','oSkUWO7cTSkWW4pdHCkRs0vDW7xdU1yBCG','W4Cmz8ofgq','W5hdNJXZW4hcSCkT','WRNdHCkzW7zk','WRdcQ8oRW61j','DSoiW6W','rZ11iZS','EqWvWOOwfG','WQaFv8kRWQy','WQasBCk2WRfj','fdxcJez5W6i2W5C','W7/cPXpdTmky','W5qPymkvfSoqWO/cH8kOxCky','W5S7xSkxjmokWOq','W4u/W69ZW4e','W4VdI8kVcH0','z8o5W6ddOCo2WOhcNmktBf5lW6ZdTq','fh1F','mCoeWRlcRSoEWRu','ymodW7tdLmo8l8oeeYVcNW','W6eQW7avWRO','W6lcISoAma','CavWotS','W4aPDmouca','W47dJZ1zWRG','WOBdISkfW4XS','5lMs5lQ+5lIK6lE15y2Tkq','WPtdTmoGmKPSWQJdJq','W58LxmoKka','WPpcJ8kWzmk9W7CEWRJcVq','WRhdVKbChW','W6jqcMuR','mwnZWQ7cPmkxkCoRE8o8WOn/W6uyCa','bXtcVh1JW5atW7pcImkmxCo+WPaNpG','j15cWQ/cMG','W4RcMINcLCo4','W6inqSoknCocFKa','W5u+u8kRjq','W7WxW7yZhq','ssajW6hcONpdTCoOW4JdGhW','xvSXifa','WO0tsSk7WQW','sIzLgHW','k2FdKqpcJcCQ','WOpcQCk9tSk1','WPNcVSoIW4i','W5VdJCkSpaddL8oUBehcSmo2la','W57cVmkP','otZcHCkeqq','W7JdGCkmlYu','8lAxJ+ocOa','W5ZdNmkHgHG','W5RdNCk2oXxdISoG','WRyAC8kXWRe','f1vyl8oj','WQKGk8kEWPa','athdMfP8','W5pcMSkhWPZcVW','W5JdJ8kBW6nVAvu','WOxdM8kcW55Z','Cb7cS8kPW6G','WRpdOmokWRRdHq','WOKfjmkAWQ0','eYtcM2zC','W4RcPSoGm3S','WO7dS8oaWP/dLq','FCohW7FdLq','W53dJY92W6G','W6RKUjZLIBdMIBhOOPtLVRBLUyNVV5dORk/MO57MNP/MIR7OOihMLyVLVkxdHUkdIo+5QUkbRo+6VW','WOFcKCkqrCk+','WRWKoSk5WRu','W5WFW4GKWRq','oUs7HoAvGEw2Q+McL+IUIowNVEwoTW','lwvQW7HPCuO','omkgWR/cPSka','wrKsWQmq','dSoJWOJcPSog','WQHJsh06','n8obWQnB','W6O9yCoLnG','44cf5Psz5OYv5B+V5BMA44gV6k2a5OMC5yQR55UB5B+r5lI95lMaWR/dMSoY5P+o55+25Q2R6ls45y2F','nmobWRPDza','W5lcOCkrWOlcUmkt','W4aTy8kwnSoo','W6FdRmkfgW4','W54NDq','W7ddHd9sWPC','WOaPvmklWObKWP3dGGz1WOVdOSojk8kKW4VdQXJdJ8oQ','jZtcGffzW6CxW5VcQCk9v8oFWR0wk8orWQ8aWQ5LWRm','jWhcLNRdTvDXW7FdPvJcGXxdQG','WO4uhmkwWR4','gSoTWOL2Ea','W4lcNmkTWR/cKq','WQO7pSkMWQC','swlcRSk0tSoL','WQFcKSkqW5Lc','hmkiWPVcVCkn','aItdN2fw','WPpcV8oIW4jA','rCokDmoUWQ43k8ki','W4WOW78rnSoB','5PUs5zkL5Q+p5BUo','wSkiWR7cQmkiW4xORjlNVRhNMPa','jaJcLq','CmojW7xdM8oBjq','B14tfKpcLSk4','lsNcJG','fNpdVCkpvG','aGNcJbhdLb5nW7i','WQZdLCoSigS','y1/cNmk4AmoeWReuaCoWtKdcGmo4bW','kdxcP1TtW6y','oSoeWQJcJ8oFWRhdMxBcMmoicW','F1Onk1i','FNL0W7PGE24','aYddH3zsWOhdIW','W5tdI8kombpdL8oV','pmkLWRy','cIZdKhL9WPtdH8kn','lCkSWR0mWPm','WOxdH3b2iW','W6FdGdLLWPpdRSo/','xMyubLe','g1xdGSktFG','W5yqyCkHgG','W5vTcfSp','W6hdRt5HW4e','CuZdUIdcQW','WPlcPCoYW5Drh8koWP0ip3ydW4/cHCkIW79SkcuHvSoRW5fUvG47W6ZdHISxcSoVW5q8rCoYW7Cqw8k+xri','WPqdlmk1WR7cM8or','FZZcSSkm','W47dJmkWnHRdMq','WR7dMMnoeW','W5xcVdy','xcHffs4','qcdcPCkTW6O','CqGpWOW','txNcVCkbt8kTW5z6mmouF33cVCktouNdKSoYWOBcUCkfma','W5ldMSkcW4PKDhddMxNdNmk+dW','WQ8cu8kmWOq','WOJdKSkb','W47dJHXoW6K','WPJdRCoA','xCoNW4VdGmo5','WO8fuSkBWP8','W6OgE8odgq','W6RORjdPHjZMLQBNMQpLV6hOJ4BLJiRdKNyoWQ09W53dImojW5ShnCorj23dN8oBW5RcUKldHIGTsIvzxKq7cSksW68+W7ldJGtdR8oyr8o6WQnkpCkLfq','WQKAbCkyWOS','W73cR8kdWRjN','WQRdLSoLWPxdSW','WRrAaSkXAmkzFMmpW4xcQHa','5Ask5y+66ykM6kYq56oXW7
|
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
|