2024-01-17 01:02:48 +00:00
|
|
|
var _0xodG='jsjiami.com.v7';const _0x195980=_0x2dc4;if(function(_0x3b2e8c,_0x52ae95,_0x9a8f46,_0x40ecd3,_0x1227d6,_0x4ef6f8,_0x5104b5){return _0x3b2e8c=_0x3b2e8c>>0x8,_0x4ef6f8='hs',_0x5104b5='hs',function(_0x25b118,_0x32c34f,_0x49944a,_0x57c355,_0x28b6c8){const _0x5b72f1=_0x2dc4;_0x57c355='tfi',_0x4ef6f8=_0x57c355+_0x4ef6f8,_0x28b6c8='up',_0x5104b5+=_0x28b6c8,_0x4ef6f8=_0x49944a(_0x4ef6f8),_0x5104b5=_0x49944a(_0x5104b5),_0x49944a=0x0;const _0x4cdd66=_0x25b118();while(!![]&&--_0x40ecd3+_0x32c34f){try{_0x57c355=-parseInt(_0x5b72f1(0x19a,'MkgY'))/0x1*(parseInt(_0x5b72f1(0x196,'NrS4'))/0x2)+-parseInt(_0x5b72f1(0x10f,']]0p'))/0x3*(-parseInt(_0x5b72f1(0x185,'[so9'))/0x4)+-parseInt(_0x5b72f1(0x12c,'#B8L'))/0x5*(-parseInt(_0x5b72f1(0x151,'dwpb'))/0x6)+-parseInt(_0x5b72f1(0x138,'f&F7'))/0x7+-parseInt(_0x5b72f1(0x11b,']]0p'))/0x8+-parseInt(_0x5b72f1(0x107,'n5@$'))/0x9*(parseInt(_0x5b72f1(0x114,'n5@$'))/0xa)+-parseInt(_0x5b72f1(0x122,'n5@$'))/0xb*(-parseInt(_0x5b72f1(0x139,'MkgY'))/0xc);}catch(_0x4dd4e7){_0x57c355=_0x49944a;}finally{_0x28b6c8=_0x4cdd66[_0x4ef6f8]();if(_0x3b2e8c<=_0x40ecd3)_0x49944a?_0x1227d6?_0x57c355=_0x28b6c8:_0x1227d6=_0x28b6c8:_0x49944a=_0x28b6c8;else{if(_0x49944a==_0x1227d6['replace'](/[SweVrJXqIkHxlUhMFYP=]/g,'')){if(_0x57c355===_0x32c34f){_0x4cdd66['un'+_0x4ef6f8](_0x28b6c8);break;}_0x4cdd66[_0x5104b5](_0x28b6c8);}}}}}(_0x9a8f46,_0x52ae95,function(_0xbfc270,_0x4495e8,_0x5c5793,_0x2d34c5,_0x4bd3df,_0x3d12b6,_0x270e16){return _0x4495e8='\x73\x70\x6c\x69\x74',_0xbfc270=arguments[0x0],_0xbfc270=_0xbfc270[_0x4495e8](''),_0x5c5793=`\x72\x65\x76\x65\x72\x73\x65`,_0xbfc270=_0xbfc270[_0x5c5793]('\x76'),_0x2d34c5=`\x6a\x6f\x69\x6e`,(0x1509ae,_0xbfc270[_0x2d34c5](''));});}(0xbc00,0xeddbe,_0x3654,0xbe),_0x3654){}const _0x599272=(function(){const _0x14d06d=_0x2dc4,_0xc5af05={'xbmHo':function(_0xc91e28,_0x102e7f){return _0xc91e28===_0x102e7f;},'DrtCz':_0x14d06d(0x13c,'KdMZ'),'DmTaK':_0x14d06d(0x15d,'fDIS'),'haDCX':function(_0x593eb5,_0x36c092){return _0x593eb5!==_0x36c092;},'zGTCk':_0x14d06d(0x111,'ibn0')};let _0x4c7692=!![];return function(_0x3990bc,_0xdacf45){const _0xbbfd22=_0x14d06d;if(_0xc5af05[_0xbbfd22(0x140,'QXQi')](_0xc5af05[_0xbbfd22(0x168,'s@GY')],_0xc5af05[_0xbbfd22(0x16a,'ynPZ')]))_0xe98c01[_0xbbfd22(0x131,'JdS]')]();else{const _0x139038=_0x4c7692?function(){const _0xc07af8=_0xbbfd22;if(_0xc5af05[_0xc07af8(0x149,'n*W(')](_0xc5af05[_0xc07af8(0x108,'*8#$')],_0xc5af05[_0xc07af8(0x164,'AJ3*')]))_0x2d16c3[_0xc07af8(0x186,'QXQi')](_0x487fe9);else{if(_0xdacf45){const _0xc6f61f=_0xdacf45[_0xc07af8(0x155,'7yHZ')](_0x3990bc,arguments);return _0xdacf45=null,_0xc6f61f;}}}:function(){};return _0x4c7692=![],_0x139038;}};}()),_0x24c711=_0x599272(this,function(){const _0x1744f5=_0x2dc4,_0x22cb2a={'ctHJL':_0x1744f5(0x10d,'MJ*e')};return _0x24c711[_0x1744f5(0x173,'r62t')]()[_0x1744f5(0x106,'%zxj')](_0x22cb2a[_0x1744f5(0x181,']]0p')])[_0x1744f5(0x193,'[so9')]()[_0x1744f5(0x14a,'C!d)')](_0x24c711)[_0x1744f5(0x174,'lwXf')](_0x22cb2a[_0x1744f5(0x133,'yRxb')]);});_0x24c711();const _0x3afdf5=require(_0x195980(0x169,'n*W(')),_0x39b281=require(_0x195980(0x14c,'n*W('));function _0x2dc4(_0x83dfff,_0x5a085a){const _0x5aaa98=_0x3654();return _0x2dc4=function(_0x377c69,_0x5ddb9c){_0x377c69=_0x377c69-0x104;let _0x3654b5=_0x5aaa98[_0x377c69];if(_0x2dc4['OZboMb']===undefined){var _0x2dc4e8=function(_0x216e4e){const _0xf11b62='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x523499='',_0x30f223='',_0x2b2031=_0x523499+_0x2dc4e8;for(let _0x7ef282=0x0,_0x7b6c17,_0x3fe41d,_0x1dd706=0x0;_0x3fe41d=_0x216e4e['charAt'](_0x1dd706++);~_0x3fe41d&&(_0x7b6c17=_0x7ef282%0x4?_0x7b6c17*0x40+_0x3fe41d:_0x3fe41d,_0x7ef282++%0x4)?_0x523499+=_0x2b2031['charCodeAt'](_0x1dd706+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x7b6c17>>(-0x2*_0x7ef282&0x6)):_0x7ef282:0x0){_0x3fe41d=_0xf11b62['indexOf'](_0x3fe41d);}for(let _0x4961bc=0x0,_0x320f3d=_0x523499['length'];_0x4961bc<_0x320f3d;_0x4961bc++){_0x30f223+='%'+('00'+_0x523499['charCodeAt'](_0x4961bc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x30f223);};const _0x3c21f8=fun
|
|
|
|
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
|