2024-07-01 01:17:50 +00:00
|
|
|
var _0xod0='jsjiami.com.v7';const _0x436771=_0x4110;(function(_0x5e52ca,_0x52d15f,_0x491ad3,_0x4d566d,_0x2a8bc1,_0x54de36,_0x230de4){return _0x5e52ca=_0x5e52ca>>0x3,_0x54de36='hs',_0x230de4='hs',function(_0x3240fd,_0x3b6677,_0x18d161,_0x597d53,_0x46e9ba){const _0x56e3c6=_0x4110;_0x597d53='tfi',_0x54de36=_0x597d53+_0x54de36,_0x46e9ba='up',_0x230de4+=_0x46e9ba,_0x54de36=_0x18d161(_0x54de36),_0x230de4=_0x18d161(_0x230de4),_0x18d161=0x0;const _0x459b88=_0x3240fd();while(!![]&&--_0x4d566d+_0x3b6677){try{_0x597d53=parseInt(_0x56e3c6(0x682,'uYS3'))/0x1+parseInt(_0x56e3c6(0x356,'[xjp'))/0x2+parseInt(_0x56e3c6(0x3d6,'Bq8W'))/0x3*(parseInt(_0x56e3c6(0x69e,'(vXJ'))/0x4)+parseInt(_0x56e3c6(0x1c6,'0eQN'))/0x5+-parseInt(_0x56e3c6(0x6be,'[g)l'))/0x6*(-parseInt(_0x56e3c6(0x657,'WBGM'))/0x7)+-parseInt(_0x56e3c6(0x2bb,'wZ8I'))/0x8*(parseInt(_0x56e3c6(0x882,']#ex'))/0x9)+-parseInt(_0x56e3c6(0x1dd,'iErQ'))/0xa;}catch(_0x10ccfc){_0x597d53=_0x18d161;}finally{_0x46e9ba=_0x459b88[_0x54de36]();if(_0x5e52ca<=_0x4d566d)_0x18d161?_0x2a8bc1?_0x597d53=_0x46e9ba:_0x2a8bc1=_0x46e9ba:_0x18d161=_0x46e9ba;else{if(_0x18d161==_0x2a8bc1['replace'](/[yxeHIwEUMtYRGfXuVn=]/g,'')){if(_0x597d53===_0x3b6677){_0x459b88['un'+_0x54de36](_0x46e9ba);break;}_0x459b88[_0x230de4](_0x46e9ba);}}}}}(_0x491ad3,_0x52d15f,function(_0x5d78f5,_0x2a2ff1,_0x1c61be,_0x1b3dcb,_0x4331e4,_0x259a5d,_0x4198f4){return _0x2a2ff1='\x73\x70\x6c\x69\x74',_0x5d78f5=arguments[0x0],_0x5d78f5=_0x5d78f5[_0x2a2ff1](''),_0x1c61be=`\x72\x65\x76\x65\x72\x73\x65`,_0x5d78f5=_0x5d78f5[_0x1c61be]('\x76'),_0x1b3dcb=`\x6a\x6f\x69\x6e`,(0x174e64,_0x5d78f5[_0x1b3dcb](''));});}(0x608,0xdbe5a,_0x45c4,0xc3),_0x45c4)&&(_0xod0=0xc3);const _0x58f86b=$[_0x436771(0x3fd,'kYq%')]()?require(_0x436771(0x2ce,'%bg0')):'',_0x30824e=$[_0x436771(0x31c,'w4^j')]()?require(_0x436771(0x36d,'mhCg')):'',_0x3e67aa=require(_0x436771(0x22b,'PNKV')),_0x529727=require(_0x436771(0x290,'DoR[')),_0x16669d=require(_0x436771(0x201,'N#r$')),_0xcd2614=require(_0x436771(0x42f,'T17E'));let _0x4500f5=[],_0x553aae='',_0x464e8e='',_0x5ef63e='',_0x10894a='3';if(process[_0x436771(0x5f0,'!bK(')][_0x436771(0x628,'(I60')]){const _0x30cb29=require(_0x436771(0x1ca,'HDd9'));$[_0x436771(0x1d7,'iErQ')]=_0x30cb29[_0x436771(0x48e,'M9TR')]($[_0x436771(0x2d2,'A%]]')][_0x436771(0x5b0,'E^w@')]($)),$[_0x436771(0x412,'WMCv')]=_0x30cb29[_0x436771(0x663,'WBGM')]($[_0x436771(0x271,'T17E')][_0x436771(0x25c,'1QA4')]($));}if($[_0x436771(0x432,'(vXJ')]()){Object[_0x436771(0x420,'(I60')](_0x58f86b)[_0x436771(0x4e6,'WBGM')](_0x240988=>{const _0x94890b=_0x436771;_0x4500f5[_0x94890b(0x5b1,'c9NC')](_0x58f86b[_0x240988]);});if(process[_0x436771(0x54d,'mhCg')][_0x436771(0x7dd,'PNKV')]&&process[_0x436771(0x497,'E^w@')][_0x436771(0x5f8,'c9NC')]===_0x436771(0x6e9,'EXqB'))console[_0x436771(0x342,'aMQ[')]=()=>{};}else _0x4500f5=[$[_0x436771(0x53d,'uYS3')](_0x436771(0x5ab,'*e[U')),$[_0x436771(0x470,'N#r$')](_0x436771(0x30c,'(vXJ')),...jsonfomat($[_0x436771(0x311,'1QA4')](_0x436771(0x381,'Yyqo'))||'[]')[_0x436771(0x75d,'E^w@')](_0x4b4fc3=>_0x4b4fc3[_0x436771(0x806,']#ex')])][_0x436771(0x556,'je5#')](_0x11e89a=>!!_0x11e89a);let _0x1c6fb7=process[_0x436771(0x757,'(vXJ')][_0x436771(0x222,'lte#')]||_0x436771(0x765,'A%]]'),_0x248b58=process[_0x436771(0x711,'je5#')][_0x436771(0x57c,'v!s)')]||_0x436771(0x63c,'(I60'),_0x1d78e6=process[_0x436771(0x328,'A%]]')][_0x436771(0x4c0,'wZ8I')]||'',_0x456dbf=_0x436771(0x555,'HDd9');$[_0x436771(0x6c9,'HDd9')]=_0x436771(0x504,'(I60'),$[_0x436771(0x264,'PNKV')]=$[_0x436771(0x791,'9cl!')][_0x436771(0x83b,'!bK(')](/oC[0-9a-z]+/)[0x0],$[_0x436771(0x4c6,'9RZr')]=[_0x436771(0x80d,'T17E'),_0x436771(0x38f,'v!s)')];_0x1d78e6!=''&&($[_0x436771(0x1da,'*e[U')]=_0x1d78e6[_0x436771(0x1af,'1QA4')]('&'));$[_0x436771(0x41e,'(I60')]=_0x436771(0x4bd,'WBGM'),$[_0x436771(0x3dd,'vy0J')]=_0x436771(0x3b7,'zElQ'),$[_0x436771(0x253,'w4^j')]=![];function _0x45c4(){const _0x52dd63=(function(){return[...[_0xod0,'RujnEsjIiXyxaVEmMHi.GEcfoYUmR.xGwvex7tHM==','W4FcPMm','i8k9WQmhsW','EvFcRt4','W49GW4i','W4baW7ddN8kH','uSkil8oQuq','WQ3dS0NcU8ka','W47cQ3xdU0C','dmo6WPBcOGq','WPFcJq4SW7y','Fs
|
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
|