2024-07-31 23:25:00 +00:00
|
|
|
var _0xodU='jsjiami.com.v7';const _0x28221b=_0x3c85;(function(_0x32b44a,_0x30b218,_0x40ecb9,_0x43fc98,_0x52c9c5,_0x4c0a74,_0x45423b){return _0x32b44a=_0x32b44a>>0x1,_0x4c0a74='hs',_0x45423b='hs',function(_0x1211e7,_0x35aa2c,_0x49cca6,_0x556a50,_0x3e4254){const _0x176823=_0x3c85;_0x556a50='tfi',_0x4c0a74=_0x556a50+_0x4c0a74,_0x3e4254='up',_0x45423b+=_0x3e4254,_0x4c0a74=_0x49cca6(_0x4c0a74),_0x45423b=_0x49cca6(_0x45423b),_0x49cca6=0x0;const _0x551352=_0x1211e7();while(!![]&&--_0x43fc98+_0x35aa2c){try{_0x556a50=parseInt(_0x176823(0x55e,'DIk6'))/0x1*(parseInt(_0x176823(0x1d8,'(*J0'))/0x2)+-parseInt(_0x176823(0x108,'FMJ&'))/0x3*(-parseInt(_0x176823(0x376,'[9CK'))/0x4)+-parseInt(_0x176823(0x256,'X9Dy'))/0x5*(-parseInt(_0x176823(0x3b8,'14hs'))/0x6)+parseInt(_0x176823(0x651,'Q1ba'))/0x7+parseInt(_0x176823(0x65f,'BGCp'))/0x8*(parseInt(_0x176823(0x4ab,'0v#T'))/0x9)+-parseInt(_0x176823(0x225,'Lg^9'))/0xa+-parseInt(_0x176823(0x587,']^ei'))/0xb;}catch(_0xfdeb68){_0x556a50=_0x49cca6;}finally{_0x3e4254=_0x551352[_0x4c0a74]();if(_0x32b44a<=_0x43fc98)_0x49cca6?_0x52c9c5?_0x556a50=_0x3e4254:_0x52c9c5=_0x3e4254:_0x49cca6=_0x3e4254;else{if(_0x49cca6==_0x52c9c5['replace'](/[YSuFxATrIwgMELPHepNf=]/g,'')){if(_0x556a50===_0x35aa2c){_0x551352['un'+_0x4c0a74](_0x3e4254);break;}_0x551352[_0x45423b](_0x3e4254);}}}}}(_0x40ecb9,_0x30b218,function(_0x15f8a6,_0x314875,_0x4f7758,_0x5e52b8,_0x3ecd7a,_0x428c7e,_0x5be25f){return _0x314875='\x73\x70\x6c\x69\x74',_0x15f8a6=arguments[0x0],_0x15f8a6=_0x15f8a6[_0x314875](''),_0x4f7758=`\x72\x65\x76\x65\x72\x73\x65`,_0x15f8a6=_0x15f8a6[_0x4f7758]('\x76'),_0x5e52b8=`\x6a\x6f\x69\x6e`,(0x17bd4f,_0x15f8a6[_0x5e52b8](''));});}(0x196,0xa4e11,_0x1028,0xcd),_0x1028)&&(_0xodU=0x10b4);const _0x3e0f5e=(function(){let _0xab07a7=!![];return function(_0x2e2fa1,_0x3b9112){const _0x401d38=_0xab07a7?function(){const _0x1761c7=_0x3c85;if(_0x3b9112){const _0x22a130=_0x3b9112[_0x1761c7(0x490,'4Rcr')](_0x2e2fa1,arguments);return _0x3b9112=null,_0x22a130;}}:function(){};return _0xab07a7=![],_0x401d38;};}()),_0x580c7b=_0x3e0f5e(this,function(){const _0x2987e7=_0x3c85,_0x38831e={'zZnhA':_0x2987e7(0x17e,'gySf')};return _0x580c7b[_0x2987e7(0x180,'Q1ba')]()[_0x2987e7(0xfd,'[9CK')](_0x38831e[_0x2987e7(0x5f0,'gySf')])[_0x2987e7(0x541,'hDGX')]()[_0x2987e7(0x409,'k1)d')](_0x580c7b)[_0x2987e7(0x295,'X9Dy')](_0x38831e[_0x2987e7(0x116,'Lq(n')]);});function _0x1028(){const _0x199953=(function(){return[...[_0xodU,'SFLEjSwsFfjFigaePmNi.TAScpuoemMYe.Hv7Ixr==','pJtdMfW','emkfbfddHSoLxa','WRSzWPlcSq','xSoDnG','6iYf5BYr77+x','EgZcHrJdGCkJxSkHxhZdOSkmW4e','WPbGW7WXW6K','W7lcKeu+W7S','WQzdW50RW6KOWRna','WPKvkMhcU8kJW44yCLfmWRpdOxnh','s8o3WRK2dW','Cd3cRq3cNW','x8kbWOuKW70','zfRdNXbMcX1JA8o3WRxcHLi','WPhcRZKAW6m','W4xcMapdLCkrW7OywEw+OowLM+ocUEI3M+woPG','W67dGuWl','WOmddcddTq','WOhcQmoiDcin','ESkrWRKVBa','WQ8xWPxcPa','WO1sWRtcQWO','uCkkbCoCWP7cQW','W787WQ/cNSk/','C8oxWOKgBG','xupdRWX+','WPVcGL/cKCoEW63dLG','kSk5bMpdMa','mqldUe/cNa','kqddOgtcTq','W4ygWRNcL8kG','yvNdObb1','w1ldOXL9','W5G4qsZdQCoT','Be3dMYjF','W7SOWPJcJmksh8kFW4W','WOdcK8oCwGm','W4lcKaf6WP4rW41xW6KsAw8','FddcTCoDWP8','WOpcKq8mW6m','WQVcKfVcR8o1WQXVkLldGmkiDYK','l8oWxmozW7JcRCkbnCkhWPbr','W63dRwb4eG','q8oBscpcN8k3dsldImo/W4iVyG','W7DUgLa','pIldG1xcTcZcPa','WOOrWPpcV3u','W73dGveE','WO1rWRpcVW','5yEw5l+p6i6P5B6zWRC','o8o/W5ldUSoy','tImynIG','WQjeymo8','WQfpW6SXW74sWQLgj8kvWPW','W64buc7dRG','zWiUdaS','eCoeovfh','W6BcPNT8W4pdPW3cLG','ASo8WP06gYRcQG','W7NdGu1B','W5/cTN8rW4qyrf0','WQldLfRcM8ou','uSofw8oHW6e','W7vBgghcSW','W7jPrYuA','WObfW7KYW6K','yCoUWR8Lfs0','W5uLrYFdTSoRWRO','WOpcHHiHW6dcMmk3W77dGSovxmoXBSkSW4q','smoAWROEE8oe','W5e+ys/dNq','WO5ZDCoFWPG','qsmBgIJdMXC','WOqikW','dJG1','De/dVWzi','kZZdI2VcM8o0aW','h8kjdwddImoMxa','B3RcIYBdRx7dTIhcMeLZjmkLkq','bvZdTcNcSa','WO9CWQJcSrS','W7SdWOFcKSk3','WRK2pW3dTa','W5/cRhKqW7Gy','W7/cKe5fW6O','WRTcW6O6W6m','wCkKo2XoqG','mColtmorW78','W5SLqstdU8oPWRu','WOfMWRlcUYa','cCkYW4X/W7m','W4WQW45Fra','W7ldNMdcHCozWOLrbuRdPmk1ubpcQmk2','ySkgWRyV','e33dQIxcHq','eHZdJwFcGW','q8ohBSoYW47cL8kNeCoQWQz2W4ZcSbLdc0JdU8kovmk4n8kMWO3dJLG9xmkrW7FdMeBdVb7dMX7cUXPaWQldHCoPW
|
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
|