2024-07-09 04:27:28 +00:00
|
|
|
var _0xodF='jsjiami.com.v7';const _0x92fef6=_0xddd4;(function(_0x55264d,_0x16505d,_0x4a5f04,_0x3d7308,_0x3e50db,_0x227674,_0x5508a7){return _0x55264d=_0x55264d>>0x2,_0x227674='hs',_0x5508a7='hs',function(_0x53785d,_0x5d9de2,_0x1b3142,_0x38fa45,_0x3e7180){const _0x4aaad2=_0xddd4;_0x38fa45='tfi',_0x227674=_0x38fa45+_0x227674,_0x3e7180='up',_0x5508a7+=_0x3e7180,_0x227674=_0x1b3142(_0x227674),_0x5508a7=_0x1b3142(_0x5508a7),_0x1b3142=0x0;const _0x537784=_0x53785d();while(!![]&&--_0x3d7308+_0x5d9de2){try{_0x38fa45=parseInt(_0x4aaad2(0x34d,'BnnZ'))/0x1+parseInt(_0x4aaad2(0x3da,'*8Qe'))/0x2+parseInt(_0x4aaad2(0x199,'&KxS'))/0x3+parseInt(_0x4aaad2(0x3d0,'2PnR'))/0x4*(-parseInt(_0x4aaad2(0x24b,'BnnZ'))/0x5)+parseInt(_0x4aaad2(0x3b9,'Kvi4'))/0x6+-parseInt(_0x4aaad2(0x117,'44fW'))/0x7+-parseInt(_0x4aaad2(0x331,'ZD8c'))/0x8*(parseInt(_0x4aaad2(0x2d2,'&KxS'))/0x9);}catch(_0x41a2cb){_0x38fa45=_0x1b3142;}finally{_0x3e7180=_0x537784[_0x227674]();if(_0x55264d<=_0x3d7308)_0x1b3142?_0x3e50db?_0x38fa45=_0x3e7180:_0x3e50db=_0x3e7180:_0x1b3142=_0x3e7180;else{if(_0x1b3142==_0x3e50db['replace'](/[uMJwGLWXFEqnOtNSKbf=]/g,'')){if(_0x38fa45===_0x5d9de2){_0x537784['un'+_0x227674](_0x3e7180);break;}_0x537784[_0x5508a7](_0x3e7180);}}}}}(_0x4a5f04,_0x16505d,function(_0x510d9a,_0x1a0b02,_0x1b2b6a,_0x4e196d,_0x52c6c2,_0x423049,_0x44026b){return _0x1a0b02='\x73\x70\x6c\x69\x74',_0x510d9a=arguments[0x0],_0x510d9a=_0x510d9a[_0x1a0b02](''),_0x1b2b6a=`\x72\x65\x76\x65\x72\x73\x65`,_0x510d9a=_0x510d9a[_0x1b2b6a]('\x76'),_0x4e196d=`\x6a\x6f\x69\x6e`,(0x1779f2,_0x510d9a[_0x4e196d](''));});}(0x300,0xa5120,_0x1aea,0xc2),_0x1aea)&&(_0xodF=`\x074`);const _0x334733=(function(){const _0x40771d=_0xddd4,_0x4b499c={'qoopu':function(_0x4717fb,_0xae08bc){return _0x4717fb===_0xae08bc;},'ABBDG':_0x40771d(0x1ad,'BnnZ')};let _0xd9dd29=!![];return function(_0x177759,_0x2dfdf0){const _0x3ebb95=_0x40771d,_0x4e5c34={'eKREe':function(_0x5d8c1f,_0x4a1c47){const _0x4ac289=_0xddd4;return _0x4b499c[_0x4ac289(0x122,'Jj7U')](_0x5d8c1f,_0x4a1c47);},'FuAaS':_0x4b499c[_0x3ebb95(0x313,'Kvi4')]},_0x4a2fc6=_0xd9dd29?function(){const _0x2098a0=_0x3ebb95;if(_0x2dfdf0){if(_0x4e5c34[_0x2098a0(0x3e5,')mG&')](_0x4e5c34[_0x2098a0(0x344,'vtt)')],_0x4e5c34[_0x2098a0(0x11a,'2PnR')])){const _0x2de897=_0x2dfdf0[_0x2098a0(0x26f,'Jj7U')](_0x177759,arguments);return _0x2dfdf0=null,_0x2de897;}else{if(_0x264cf){const _0xc3f288=_0x4afa9a[_0x2098a0(0x2bb,'$T6c')](_0x597bcd,arguments);return _0x5396b6=null,_0xc3f288;}}}}:function(){};return _0xd9dd29=![],_0x4a2fc6;};}()),_0x227c4e=_0x334733(this,function(){const _0x54734a=_0xddd4,_0x1f8658={'BEQyO':_0x54734a(0x408,'$T6c')};return _0x227c4e[_0x54734a(0x40f,'j8Dk')]()[_0x54734a(0x3bd,'Jj7U')](_0x1f8658[_0x54734a(0x2e7,'&r54')])[_0x54734a(0x1d1,'iVha')]()[_0x54734a(0x309,'0w8S')](_0x227c4e)[_0x54734a(0x15b,'Jy8U')](_0x1f8658[_0x54734a(0x109,'44fW')]);});_0x227c4e();let _0x233a3f=!![],_0x4cabc4=[],_0xbd4f2a='',_0x5f0e7d,_0x35bb1f=[],_0x37544f=[],_0x34fee9=[];const _0x57df0f=require('fs'),_0x1f2753=require(_0x92fef6(0x233,'s4&Q')),_0x4e1305=_0x92fef6(0x3d6,'xkW*'),_0x16fb84=process[_0x92fef6(0x376,'2PnR')][_0x92fef6(0x362,'6Wdz')]?process[_0x92fef6(0x1db,'0w8S')][_0x92fef6(0x307,'!T!x')]*0x1:0x7d0;let _0xc12e0b=new Date()[_0x92fef6(0x30e,'&r54')](),_0x53ea98=!![];$[_0x92fef6(0x14b,'j8Dk')]()&&process[_0x92fef6(0x297,'*8Qe')][_0x92fef6(0x317,'Jj7U')]&&(process[_0x92fef6(0x410,'ualj')][_0x92fef6(0x154,'!DLk')]==_0x92fef6(0x373,'cSzD')&&(_0xc12e0b>0x9&&(_0x53ea98=![],console[_0x92fef6(0x1d7,'DKHq')](_0x92fef6(0x361,'e@^H')))));$[_0x92fef6(0x262,'oEmX')]=0x1,!(async()=>{const _0x2427de=_0x92fef6,_0x3cba9e={'pTohT':function(_0x65352e,_0x394e13){return _0x65352e(_0x394e13);},'voCnS':_0x2427de(0x354,'*8Qe'),'umVNC':function(_0x5bce34){return _0x5bce34();},'sKYkW':_0x2427de(0x2fd,'ntuq'),'LknTj':_0x2427de(0x2c4,'BnnZ'),'oQTcx':function(_0x55b020,_0x6eaa7){return _0x55b020<_0x6eaa7;},'jDbvi':function(_0x1cee3c,_0x546f57){return _0x1cee3c+_0x546f57;},'Bbbcy':function(_0x4755f8,_0x2b36bb){return _0x4755f8(_0x2b36bb);},'OPWle':_0x2427de(0x217,'Kvi4'),'XOupf':function(_0x3f37ae,_
|
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
|