|
|
|
var _0xodf='jsjiami.com.v7';const _0x587f40=_0x1088;(function(_0x4cfe58,_0x570748,_0x59bd45,_0x19a67c,_0x28e953,_0x202909,_0x22cb25){return _0x4cfe58=_0x4cfe58>>0x5,_0x202909='hs',_0x22cb25='hs',function(_0x99af7f,_0x3773b5,_0x23a18d,_0xe01918,_0x45650a){const _0x1e58c7=_0x1088;_0xe01918='tfi',_0x202909=_0xe01918+_0x202909,_0x45650a='up',_0x22cb25+=_0x45650a,_0x202909=_0x23a18d(_0x202909),_0x22cb25=_0x23a18d(_0x22cb25),_0x23a18d=0x0;const _0x22fdd2=_0x99af7f();while(!![]&&--_0x19a67c+_0x3773b5){try{_0xe01918=parseInt(_0x1e58c7(0x162,'wl2K'))/0x1*(parseInt(_0x1e58c7(0x1c3,'jWJK'))/0x2)+parseInt(_0x1e58c7(0x2c7,')]3g'))/0x3+-parseInt(_0x1e58c7(0x343,'CbZH'))/0x4*(-parseInt(_0x1e58c7(0x1a1,'i]iM'))/0x5)+parseInt(_0x1e58c7(0x12f,'s1FE'))/0x6*(parseInt(_0x1e58c7(0x265,'jWJK'))/0x7)+-parseInt(_0x1e58c7(0x176,'VA[P'))/0x8*(parseInt(_0x1e58c7(0x28b,'5rAA'))/0x9)+-parseInt(_0x1e58c7(0x11e,'ssQE'))/0xa+parseInt(_0x1e58c7(0x247,'(nh*'))/0xb;}catch(_0x5d92c9){_0xe01918=_0x23a18d;}finally{_0x45650a=_0x22fdd2[_0x202909]();if(_0x4cfe58<=_0x19a67c)_0x23a18d?_0x28e953?_0xe01918=_0x45650a:_0x28e953=_0x45650a:_0x23a18d=_0x45650a;else{if(_0x23a18d==_0x28e953['replace'](/[wLYdqWDSrlxEMgyAI=]/g,'')){if(_0xe01918===_0x3773b5){_0x22fdd2['un'+_0x202909](_0x45650a);break;}_0x22fdd2[_0x22cb25](_0x45650a);}}}}}(_0x59bd45,_0x570748,function(_0x4c84f8,_0x53e6bb,_0x329410,_0xbac5b8,_0x4eacbf,_0x1bdbe6,_0x1705e0){return _0x53e6bb='\x73\x70\x6c\x69\x74',_0x4c84f8=arguments[0x0],_0x4c84f8=_0x4c84f8[_0x53e6bb](''),_0x329410=`\x72\x65\x76\x65\x72\x73\x65`,_0x4c84f8=_0x4c84f8[_0x329410]('\x76'),_0xbac5b8=`\x6a\x6f\x69\x6e`,(0x17c038,_0x4c84f8[_0xbac5b8](''));});}(0x1920,0x29092,_0x8e6d,0xcb),_0x8e6d)&&(_0xodf=`\x4cc`);const _0x3b49ac=(function(){const _0x4eaad2=_0x1088,_0x25f4c2={'AKxQV':function(_0x5a6bfc,_0x1988c4){return _0x5a6bfc!==_0x1988c4;},'yXVQg':_0x4eaad2(0x288,'n]y#'),'lXpcc':_0x4eaad2(0x148,'^W!w'),'lRHIA':function(_0x5eb61a,_0x105b5c){return _0x5eb61a===_0x105b5c;},'ZwLts':_0x4eaad2(0x2dc,'1!QX')};let _0x1619e4=!![];return function(_0x4a69e6,_0x88a767){const _0x48f248=_0x4eaad2,_0x45b47c={'jiAfp':function(_0x2fd543,_0x477fa6){const _0x30fdc8=_0x1088;return _0x25f4c2[_0x30fdc8(0x348,'GQFW')](_0x2fd543,_0x477fa6);},'ItHOp':_0x25f4c2[_0x48f248(0x19e,'d%RA')],'CyQCU':_0x25f4c2[_0x48f248(0x2b7,'i]iM')],'qdOPH':function(_0x1fdb32,_0x13467c){const _0x5adfb7=_0x48f248;return _0x25f4c2[_0x5adfb7(0x2f0,'(nh*')](_0x1fdb32,_0x13467c);},'wcZNh':_0x25f4c2[_0x48f248(0x133,'%5%Y')]},_0x277f77=_0x1619e4?function(){const _0x140750=_0x48f248;if(_0x45b47c[_0x140750(0x29e,'M0^S')](_0x45b47c[_0x140750(0x1a0,'FKSb')],_0x45b47c[_0x140750(0xb2,'FKSb')])){if(_0x88a767){if(_0x45b47c[_0x140750(0x13d,'d*Rz')](_0x45b47c[_0x140750(0x1a8,'VbGC')],_0x45b47c[_0x140750(0x283,'qd#Z')])){const _0x35ff9b=_0x88a767[_0x140750(0x137,'1!QX')](_0x4a69e6,arguments);return _0x88a767=null,_0x35ff9b;}else _0x35aeb8[_0x140750(0x25b,'GQFW')](_0x44cf59);}}else _0x3490b0[_0x140750(0x2b1,'TMq2')](_0x140750(0xdb,'d4gq')+_0x81db3a[_0x140750(0x233,'Tlfj')][_0x140750(0x2bf,'d*Rz')]+_0x140750(0xe5,'Tx((')+_0x31528b[_0x140750(0x370,'HGD$')][_0x140750(0x22e,'Tlfj')]+'元');}:function(){};return _0x1619e4=![],_0x277f77;};}()),_0x9355cb=_0x3b49ac(this,function(){const _0x497816=_0x1088,_0x2e180c={'zNPbE':_0x497816(0x36b,'0^&G')};return _0x9355cb[_0x497816(0x11b,'qd#Z')]()[_0x497816(0x286,'XeW[')](_0x2e180c[_0x497816(0x330,'CbZH')])[_0x497816(0xde,'sNNT')]()[_0x497816(0x2f8,'[3zK')](_0x9355cb)[_0x497816(0x2a6,'CbZH')](_0x2e180c[_0x497816(0x33a,'Y26J')]);});_0x9355cb();const _0x4997d6=$[_0x587f40(0x103,'d4gq')]()?require(_0x587f40(0x31f,'n]y#')):'',_0x58563c=$[_0x587f40(0x266,'Y26J')]()?require(_0x587f40(0x14c,'d%RA')):'';function _0x1088(_0x2b55b7,_0x1afe59){const _0x1de34e=_0x8e6d();return _0x1088=function(_0x56f9ff,_0x2d9cb7){_0x56f9ff=_0x56f9ff-0xa4;let _0x8e6d32=_0x1de34e[_0x56f9ff];if(_0x1088['FfINpt']===undefined){var _0x1088b3=function(_0x32c184){const _0x500634='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x26d60d='',_0x27eb97='',_0x2017d4=_0x26d60d+_0x1088b3;for(let _
|
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
|