2024-07-07 10:34:15 +00:00
|
|
|
const bdy_0x54fb0a=bdy_0x554e;(function(_0x14a7e4,_0x337dbc){const bdy_0x1596c5={_0x5b5aaa:'9ga7',_0x5d8f47:'gXXj',_0x370fbc:'lQjE',_0x4b273f:'0x359',_0x1e8d09:'0x66c',_0x5482ab:'0x56c',_0x1f444d:'Ss[d',_0x322732:'0x377'},_0x49cc4c=bdy_0x554e,_0x50fe5a=_0x14a7e4();while(!![]){try{const _0xba65bd=parseInt(_0x49cc4c('0x275',bdy_0x1596c5._0x5b5aaa))/(0x1*-0x607+-0x230f+0x2917)*(-parseInt(_0x49cc4c('0x36a',bdy_0x1596c5._0x5d8f47))/(0x1*0x76d+-0xfb3+0x848))+-parseInt(_0x49cc4c('0x2e0',bdy_0x1596c5._0x370fbc))/(-0x17d5+-0x1*0xb2e+0x1183*0x2)*(-parseInt(_0x49cc4c('0x32b','lQjE'))/(-0x83a+0x21*-0x80+0x18be))+-parseInt(_0x49cc4c(bdy_0x1596c5._0x4b273f,'*C60'))/(-0x3*-0x255+-0x1710+0x1016)+parseInt(_0x49cc4c(bdy_0x1596c5._0x1e8d09,'EY)%'))/(0xff2+0x1*-0x18db+0x8ef)*(parseInt(_0x49cc4c('0x5b1','Mmx['))/(0x15ff*-0x1+0xcdd+0x929))+parseInt(_0x49cc4c(bdy_0x1596c5._0x5482ab,'jkF['))/(-0xf03+-0x1027+-0x533*-0x6)*(parseInt(_0x49cc4c('0x5ce','h)VT'))/(-0xa7d+0x1b08+-0x1082))+-parseInt(_0x49cc4c('0x522',bdy_0x1596c5._0x1f444d))/(0xf8*0xd+-0x61*-0x31+0x101*-0x1f)*(-parseInt(_0x49cc4c(bdy_0x1596c5._0x322732,'@8Xu'))/(0x18dc+-0x2039+-0xed*-0x8))+parseInt(_0x49cc4c('0x56a','[WR^'))/(-0x9bf*-0x3+0x172d+0x1*-0x345e)*(parseInt(_0x49cc4c('0x41a','jkF['))/(-0x486+-0x2364+-0x313*-0xd));if(_0xba65bd===_0x337dbc)break;else _0x50fe5a['push'](_0x50fe5a['shift']());}catch(_0x40aa36){_0x50fe5a['push'](_0x50fe5a['shift']());}}}(bdy_0x230e,0xbd4e+-0x8c6*0x2+0x21d80));function bdy_0x230e(){const _0xf68a08=['W7G8omommutcVSkzW6VcTZ0GWPSrW5VdV2nmWQ4','qKNdSrSmWR3cQg7cKCkUWQ8','W4DREmk1gq','WOhcPCoQ','ch7dLYuasmoLzZJdTXVcOcifgSogmW','W75ty8o4W4ZdPxK','W6RcJCkLWPBcVmkrCsdcGN4','WOLQWPzUyq','B8koogFdVW','W59UWR3dUtn2lq','WRBcR07dTWxdKY4','6iYC5BYDgW','W4ZdQmoOeGu','W7njWQbN','v3JcHCk8raOmWPe','542l5Ak65y6R6ys777+ZWPLtWOP7iSkZWQZcJSkFAIL9W5pdTaJcPcVcS8oFW5105yAF54gN5zoi5yAY6zsV5yMr5yIm','oM7cLq','xSkoihe','WQnqWPzKASoF','WQPnWOm','W653BSoFW4a','oSkAW4eUiG','DwBcK8oZyq','W7JcMmk7WP7cIW','WQlcOetdPeZcGdKXW6pcPmo5wCkEaCkmFdC','W4KGW5KJWORcRsaBWOJdVhr0kvm','wLlcGConua','W59EWP3dJJm','vx7cGq','W5pcICoKmW','W5euWPWjW5W','WRBcS8kmutelW5JdTW','ju0hkJGeW7W','mw/cJCkrWRS','W77dUutcKIedcM8','W71fACoXW5JdSG','W5fIWQNdNsH6','i1yhcsyaW6GuwdpcJCoOwa','W5TwWQldSh/dICk4','W5tdQ8oniW/cNgC','WQb2mmoDoLxcG8ku','W5BcI8oKoYZcMgLEWPpdOtRdS8o3gNCyy8krWPi','WOiAW6KfWQe','gMxcGZKwEq','W4fqWP7dUMRdSSkZjffLb8khWOyDca','WQvPWRfevG','W5rPWQpdNYq','W7/dLmkFv3C','W6ZcNZjBWR8','W4OWW4LM','W49IWRtdJZbM','DtbrzmkY','W5TYWQVdLHv2','dmk8rCkMra','W7LiFa','W5ZcJCkYWPtcUq','uCoUW5azW4imAIpdQZKTwG4mrCo0uXa','CHPWAa','W5H1WRxdTY91','xSozCsW','s8oQW40tW4OCBG','W7qgW7fDWOS','6zwf6Acs5BUB6k2o7721cHn+W7BdOW0PWQNdJwxcTZBdNeddQ2q+qxZcKZVdUM5r','5y2F5yooqa','r8kshwRdS3C','rKiHrCk/W69s','DXLNBCkyba/cJwL+rCowWPWttSod','W59WECkIgf08ASkInqjC','WOKmW7OjWOlcPCkRWPu','W7OAWRW0W6XQWP8','bxhdLYe','BmomWOv/','W4niWR59','wchcKXiixCoiFG','xuG0CCkWW6y','lXj3W7K2','W7ZcPHb2WPP1reddL8o1WQqQkSkWWPu','W6tdUgNcKG4','uWrjW4bdWOBdMq7dPLRdOmkEWO0+W6ikva','eMtdGJqxySo0Es7dHHO','W4bYWR/dKei','W4fWAmkwdwO+','W59jzCo/W4hdOW','W6/cICkIWOJcOW','et9QWQdcNMjqWOJdTCkbW5u','5B215yUc5AEO56si5Okq6yA077Yr','W5JdRCokorJcKNzSg04','WO9gvGG','W7tdQ3bF','r1KWBSkAW6O','W6ZdH8oMjqa','wN7cICk8yW4','WRvkWOTzDmoDr8oecehdKComjuqCkCkXEcS','W5ZcJCoPiq','WOJdObq6sa','WQZcOSo6iXu','W4T/EZZdO8kA','W6tdR3PGFG','W5SYW5T8WOG','WOJcN8oVnSo0BCkjW5dcK8kEwmo/emkO','W4BKUyhMLOJKUyJNRiROVk7dLq','WRBcUCkn','W4vAFSoacW8','dKpdMsSX','W4RcGYDzWPS','sexcUa','zb53FmkrfG','uh/cKSkYEa4sWObMWPRdVSoKka','W5LksCoYW40','W7/cPG1KWR9RvLO','W7GfWP07W6TKWQeznuq','W5rPWRpdNY53o8kJfwRdGmkMWP80WRVdJee','zNpdGYOTWQZcKLRcQa','W7vyFcBdIq','WONcMCoViCoxDSkiW5VcSCkura','WOBcMCoM','W5NdGhnCAW','W6ZdQhnozmo7','WRFLJRZNRRNLIOPYpgy','kmk/tmkStW','WO7MIAlOOzdKUkVLI4dLViNLUAe','WP7cTSoSdG','WP7cN8o1pSog','lhdcJ8knWQi','5lIW5lI66lsS5y2J','W6OuWQq/WRv8WOqeiW','agddIJqDrSoZFq','6i2Y5B2n77Y3','BW9wu8kC','WQNdSW7cPW4','W59jzCo/W4hdO1G2WRm','WPpdKGK','W4vhEmoegq','WOXiWRv8ta','aH1sW44mWOxcOa','W6BcU3isWPG','W40TW5nIWONdQhWmWPlcPhWYBu1X','WPBdSrm5DCkT','WQahW7aPWOJcOmk6W5zJiar6','aH1sW4GcWPxcUa','W7JdI0mJb
|
2024-06-28 07:47:44 +00:00
|
|
|
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr
|