2024-08-01 00:57:00 +00:00
|
|
|
var _0xodG='jsjiami.com.v7';const _0x324b50=_0x23ac;(function(_0xcb9968,_0x39b1fb,_0x54e044,_0x427fc8,_0x41f067,_0x21183f,_0x536b7e){return _0xcb9968=_0xcb9968>>0x1,_0x21183f='hs',_0x536b7e='hs',function(_0x515847,_0x25c045,_0x409db1,_0x95f267,_0x11f711){const _0x517c5b=_0x23ac;_0x95f267='tfi',_0x21183f=_0x95f267+_0x21183f,_0x11f711='up',_0x536b7e+=_0x11f711,_0x21183f=_0x409db1(_0x21183f),_0x536b7e=_0x409db1(_0x536b7e),_0x409db1=0x0;const _0x395ac9=_0x515847();while(!![]&&--_0x427fc8+_0x25c045){try{_0x95f267=-parseInt(_0x517c5b(0x428,'h@6A'))/0x1*(-parseInt(_0x517c5b(0x44f,'YjS0'))/0x2)+parseInt(_0x517c5b(0x5da,'AJuP'))/0x3*(parseInt(_0x517c5b(0x34f,'dx3r'))/0x4)+parseInt(_0x517c5b(0x470,'6TI!'))/0x5*(parseInt(_0x517c5b(0x5d5,'v#5n'))/0x6)+parseInt(_0x517c5b(0x3b0,'^GC)'))/0x7+parseInt(_0x517c5b(0x31d,'Fe1h'))/0x8*(parseInt(_0x517c5b(0x3bb,'AoLW'))/0x9)+parseInt(_0x517c5b(0x3b7,'T*2T'))/0xa+-parseInt(_0x517c5b(0x349,'pO1u'))/0xb;}catch(_0x24865d){_0x95f267=_0x409db1;}finally{_0x11f711=_0x395ac9[_0x21183f]();if(_0xcb9968<=_0x427fc8)_0x409db1?_0x41f067?_0x95f267=_0x11f711:_0x41f067=_0x11f711:_0x409db1=_0x11f711;else{if(_0x409db1==_0x41f067['replace'](/[fJUXqQgCAWSpnMdNFHTkhx=]/g,'')){if(_0x95f267===_0x25c045){_0x395ac9['un'+_0x21183f](_0x11f711);break;}_0x395ac9[_0x536b7e](_0x11f711);}}}}}(_0x54e044,_0x39b1fb,function(_0x2d9d99,_0x410a59,_0x4f55ae,_0x10df41,_0x515877,_0x24ced2,_0x1f1818){return _0x410a59='\x73\x70\x6c\x69\x74',_0x2d9d99=arguments[0x0],_0x2d9d99=_0x2d9d99[_0x410a59](''),_0x4f55ae=`\x72\x65\x76\x65\x72\x73\x65`,_0x2d9d99=_0x2d9d99[_0x4f55ae]('\x76'),_0x10df41=`\x6a\x6f\x69\x6e`,(0x17bd59,_0x2d9d99[_0x10df41](''));});}(0x18a,0x2cb0f,_0x22b3,0xc7),_0x22b3)&&(_0xodG=0x45d2);const _0x5186d5=$[_0x324b50(0x196,'AoLW')]()?require(_0x324b50(0x39d,'9ByR')):'',_0x3e4e66=$[_0x324b50(0x19f,'ol((')]()?require(_0x324b50(0x18e,'pO1u')):'',_0x169f4f=require(_0x324b50(0x3d5,'ol((')),_0x2cb629=require(_0x324b50(0x712,'RCrB')),_0xbae0cc=require(_0x324b50(0x71e,'MvjK')),_0x56e14f=require(_0x324b50(0x471,'6TI!'));let _0x387966=[],_0x230d85='',_0x2fe47b='',_0x37bb8f='',_0x36b08f='3';if(process[_0x324b50(0x2d3,'Jv7J')][_0x324b50(0x143,'JOyR')]){const _0x165188=require(_0x324b50(0x490,'^Kk8'));$[_0x324b50(0x112,'m@xE')]=_0x165188[_0x324b50(0x423,'Iyf#')]($[_0x324b50(0x61d,'h@6A')][_0x324b50(0x516,'ABjA')]($)),$[_0x324b50(0x2a6,'v#5n')]=_0x165188[_0x324b50(0x119,'1]!R')]($[_0x324b50(0x1de,'^GC)')][_0x324b50(0x358,'RCrB')]($));}if($[_0x324b50(0x476,'iZ8d')]()){Object[_0x324b50(0x101,'MvjK')](_0x5186d5)[_0x324b50(0x3d2,'YjS0')](_0x14156e=>{const _0xb36845=_0x324b50;_0x387966[_0xb36845(0x4f8,'GZ4v')](_0x5186d5[_0x14156e]);});if(process[_0x324b50(0x3ec,'dx3r')][_0x324b50(0x55f,'dx3r')]&&process[_0x324b50(0x70f,'ABjA')][_0x324b50(0x666,'AJuP')]===_0x324b50(0x258,'ABjA'))console[_0x324b50(0x6c2,'XZ0]')]=()=>{};}else _0x387966=[$[_0x324b50(0x150,'rW%J')](_0x324b50(0x68e,'RZ5w')),$[_0x324b50(0x2cb,'KpPl')](_0x324b50(0x721,'USEa')),...jsonfomat($[_0x324b50(0x336,'Jv7J')](_0x324b50(0x2e2,'USEa'))||'[]')[_0x324b50(0x5a8,'h@6A')](_0x8af731=>_0x8af731[_0x324b50(0x752,'qR3]')])][_0x324b50(0x5e9,'RCrB')](_0x1f2c54=>!!_0x1f2c54);let _0x572646=process[_0x324b50(0x3bf,'&2%9')][_0x324b50(0x544,'KpPl')]||_0x324b50(0x258,'ABjA'),_0x4a3b80=process[_0x324b50(0x1da,'8(E#')][_0x324b50(0x693,'GZ4v')]||_0x324b50(0x344,'USEa'),_0x14f3af=process[_0x324b50(0x605,'MvjK')][_0x324b50(0x1a4,'&*Ze')]||'',_0x308d7=_0x324b50(0x2ee,'&2%9');$[_0x324b50(0x50f,'Bv1X')]=_0x324b50(0x5f7,'rW%J'),$[_0x324b50(0x30e,'m@xE')]=$[_0x324b50(0xfa,'ZF#d')][_0x324b50(0xfe,'rW%J')](/oC[0-9a-z]+/)[0x0],$[_0x324b50(0x42c,'Fe1h')]=[_0x324b50(0x522,'PntR'),_0x324b50(0x288,'&2%9')];_0x14f3af!=''&&($[_0x324b50(0x5e1,'YjS0')]=_0x14f3af[_0x324b50(0x2f2,'6TI!')]('&'));$[_0x324b50(0x26e,'G*Iz')]=_0x324b50(0x6dc,'^GC)'),$[_0x324b50(0x451,'dx3r')]=_0x324b50(0x374,'&*Ze'),$[_0x324b50(0x3ea,'n$72')]=![];let _0x1f518a=[_0x324b50(0x3c7,'8(E#')];$[_0x324b50(0x488,'USEa')]=_0x1f518a[_0x39e3f2(0x0,_0x1f518a[_0x324b50(0x38e,'rW%J')])],$[_0x324b50(0x5a6,'&*Ze')]=process[_0x324b50(0x418,'qR3]')][_0x324b50(0
|
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
|