2023-09-17 10:26:05 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const i11ll1=l1IllI;(function(lI11II1,Iil1IliI,i11II1li,lil1iiI1,lIll111,llIIll1i,ilII){return lI11II1=lI11II1>>0x6,llIIll1i='hs',ilII='hs',function(iIiIiiiI,l1l1li1,li1I11i,Il1li1ll,IIlI1l1I){const IiIiIilI=l1IllI;Il1li1ll='tfi',llIIll1i=Il1li1ll+llIIll1i,IIlI1l1I='up',ilII+=IIlI1l1I,llIIll1i=li1I11i(llIIll1i),ilII=li1I11i(ilII),li1I11i=0x0;const l1iIi1I1=iIiIiiiI();while(!![]&&--lil1iiI1+l1l1li1){try{Il1li1ll=-parseInt(IiIiIilI(0x4b0,'(fH$'))/0x1+parseInt(IiIiIilI(0x441,'4BgH'))/0x2*(-parseInt(IiIiIilI(0x2c3,'4BgH'))/0x3)+-parseInt(IiIiIilI(0x1fb,'2cYE'))/0x4*(parseInt(IiIiIilI(0x3fe,'4YUP'))/0x5)+parseInt(IiIiIilI(0x3d1,'2mjT'))/0x6+-parseInt(IiIiIilI(0x2e9,'fJxu'))/0x7+-parseInt(IiIiIilI(0x358,')Had'))/0x8*(-parseInt(IiIiIilI(0x36e,'ey^b'))/0x9)+parseInt(IiIiIilI(0x4ae,'(fH$'))/0xa*(parseInt(IiIiIilI(0x20d,'$7br'))/0xb);}catch(lllIIiI){Il1li1ll=li1I11i;}finally{IIlI1l1I=l1iIi1I1[llIIll1i]();if(lI11II1<=lil1iiI1)li1I11i?lIll111?Il1li1ll=IIlI1l1I:lIll111=IIlI1l1I:li1I11i=IIlI1l1I;else{if(li1I11i==lIll111['replace'](/[pBVAgEKGxOtFLPMnYJTSrde=]/g,'')){if(Il1li1ll===l1l1li1){l1iIi1I1['un'+llIIll1i](IIlI1l1I);break;}l1iIi1I1[ilII](IIlI1l1I);}}}}}(i11II1li,Iil1IliI,function(l1Ii1Ii1,iIIiIlII,i1ilIiil,lI1lIi1I,I1ilI1Il,IlIili1l,I1lilIi){return iIIiIlII='\x73\x70\x6c\x69\x74',l1Ii1Ii1=arguments[0x0],l1Ii1Ii1=l1Ii1Ii1[iIIiIlII](''),i1ilIiil=`\x72\x65\x76\x65\x72\x73\x65`,l1Ii1Ii1=l1Ii1Ii1[i1ilIiil]('\x76'),lI1lIi1I=`\x6a\x6f\x69\x6e`,(0x13ea02,l1Ii1Ii1[lI1lIi1I](''));});}(0x3100,0xa3679,Iliilil1,0xc6),Iliilil1)&&(version_=Iliilil1);const iI1111il=$[i11ll1(0x1b7,'ey^b')]()?require(i11ll1(0x3d3,'4YUP')):'',i1111I11=$[i11ll1(0x444,'4YUP')]()?require(i11ll1(0x2bb,'9aHz')):'';let ii11iIIl=[],l1iI11i1='';if($['isNode']()){Object[i11ll1(0x2bd,'(fH$')](iI1111il)[i11ll1(0xe9,'OWNg')](lIilIlII=>{const iil1iIIi=i11ll1;ii11iIIl[iil1iIIi(0x321,'uJDc')](iI1111il[lIilIlII]);});if(process[i11ll1(0x451,'OaH3')]['JD_DEBUG']&&process[i11ll1(0x123,'iKqR')][i11ll1(0x2b0,'Jpro')]==='false')console[i11ll1(0x3e1,'z00b')]=()=>{};}else ii11iIIl=[$[i11ll1(0x37b,'F^dc')]('CookieJD'),$[i11ll1(0x35a,'OWNg')](i11ll1(0x2b2,'It&E')),...i1Ii1($[i11ll1(0x11d,'U])1')](i11ll1(0x466,'gNAt'))||'[]')[i11ll1(0x183,'5[0q')](ll1iIiii=>ll1iIiii[i11ll1(0x340,'0(Lh')])]['filter'](illllI1=>!!illllI1);let ilI11lii='30',ii1ill11='0';ilI11lii=$['isNode']()?process['env'][i11ll1(0x19a,'WO60')]?process[i11ll1(0x123,'iKqR')]['retrynum']:ilI11lii:$[i11ll1(0x1e4,'Jpro')]('retrynum')?$[i11ll1(0x153,'86BO')](i11ll1(0x45f,'*$WT')):ii1ill11,ii1ill11=$['isNode']()?process[i11ll1(0x453,'YY@4')][i11ll1(0x2c9,'V^gt')]?process['env'][i11ll1(0x49e,'!8Tq')]:ii1ill11:$['getdata'](i11ll1(0x2a9,'JkI%'))?$[i11ll1(0x440,'ZFZ^')](i11ll1(0x2ba,']mJ6')):ii1ill11,allMessage='',message='',$['hotFlag']=![],$[i11ll1(0x112,'%NAp')]=![],$[i11ll1(0x24f,']mJ6')]=![];let iil1Iiii='',il11iIIi='',lii1lIl='',ll111lil='',I1Iiill='';CryptoJS=$[i11ll1(0x1af,'Dh6d')]()?require(i11ll1(0x27d,'8p29')):CryptoJS;const iiliiIl1=require(i11ll1(0x1b8,'947n')),lIiIIl=require(i11ll1(0x43b,'%NAp')),i11I1lI1=require(i11ll1(0x40b,'It&E'));let l1li1iI1=i11ll1(0x315,'^z0C');ll111lil=$['isNode']()?process['env'][i11ll1(0x121,'ixLM')]?process[i11ll1(0x317,'H]nd')]['helpnum']:''+ll111lil:$['getdata'](i11ll1(0x1aa,'0RgF'))?$[i11ll1(0x43f,'gNAt')]('helpnum'):''+ll111lil,I1Iiill=$[i11ll1(0x30f,'*&(T')]()?process[i11ll1(0x2ad,'o4H3')]['DPLHTY']?process['env'][i11ll1(0x2b8,'K402')]:''+I1Iiill:$[i11ll1(0x259,'^z0C')](i11ll1(0x3ec,'uJDc'))?$['getdata']('DPLHTY'):''+I1Iiill;const iii1lI=process[i11ll1(0xfb,'TY$C')][i11ll1(0x48d,'^z0C')],liI1Ii1i=process['env'][i11ll1(0x22c,'uJDc')]||'2';let l1IiI11=parseInt(liI1Ii1i)*0x3e8;iii1lI&&(l1IiI11=0x64);function l1IllI(_0x5e481c,_0xddefd4){const _0x1f4f58=Iliilil1();return l1IllI=function(_0x34de96,_0x540953){_0x34de96=_0x34de96-0xd8;let _0x19642c=_0x1f4f58[_0x34de96];if(l1IllI['DmEjEy']===undefined){var _0x1c3742=function(_0x19029e){const _0x3f3bce='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xd5df6a='',_0x280986='';for(let _0x15a70c=0x0,
|
|
|
|
|
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
|