2023-09-30 17:32:10 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const lI1i1iil=IIi1llIi;(function(II1llIl,llIl1li1,IiI1i1ii,IiiI1Il1,llI1llll,IlliIlii,i1Iiii1l){return II1llIl=II1llIl>>0x1,IlliIlii='hs',i1Iiii1l='hs',function(iii1iIi1,Iiiil1,Ii1IliI1,lIlIl1ii,ll1l1l1I){const li1il1il=IIi1llIi;lIlIl1ii='tfi',IlliIlii=lIlIl1ii+IlliIlii,ll1l1l1I='up',i1Iiii1l+=ll1l1l1I,IlliIlii=Ii1IliI1(IlliIlii),i1Iiii1l=Ii1IliI1(i1Iiii1l),Ii1IliI1=0x0;const l1IIiIII=iii1iIi1();while(!![]&&--IiiI1Il1+Iiiil1){try{lIlIl1ii=parseInt(li1il1il(0x17c,'6@Av'))/0x1*(-parseInt(li1il1il(0x2ad,'ZDMu'))/0x2)+-parseInt(li1il1il(0x246,'Tg*B'))/0x3*(-parseInt(li1il1il(0x1ec,'F^hP'))/0x4)+-parseInt(li1il1il(0x1a5,']wm5'))/0x5*(parseInt(li1il1il(0x2af,'Tg*B'))/0x6)+-parseInt(li1il1il(0x170,'bVyo'))/0x7*(parseInt(li1il1il(0x1fa,'$u56'))/0x8)+parseInt(li1il1il(0x25d,'Wnzr'))/0x9*(parseInt(li1il1il(0x31c,'e#RL'))/0xa)+parseInt(li1il1il(0x273,']xNf'))/0xb*(parseInt(li1il1il(0x338,'E)72'))/0xc)+parseInt(li1il1il(0x383,'[d&2'))/0xd;}catch(lIllil11){lIlIl1ii=Ii1IliI1;}finally{ll1l1l1I=l1IIiIII[IlliIlii]();if(II1llIl<=IiiI1Il1)Ii1IliI1?llI1llll?lIlIl1ii=ll1l1l1I:llI1llll=ll1l1l1I:Ii1IliI1=ll1l1l1I;else{if(Ii1IliI1==llI1llll['replace'](/[WQxLXyNRVgpIOJYGHwB=]/g,'')){if(lIlIl1ii===Iiiil1){l1IIiIII['un'+IlliIlii](ll1l1l1I);break;}l1IIiIII[i1Iiii1l](ll1l1l1I);}}}}}(IiI1i1ii,llIl1li1,function(IiiIIl1I,I1li1iil,iIIi111I,iIlIllll,llIIlI1I,I1i1Ii1i,illilIiI){return I1li1iil='\x73\x70\x6c\x69\x74',IiiIIl1I=arguments[0x0],IiiIIl1I=IiiIIl1I[I1li1iil](''),iIIi111I=`\x72\x65\x76\x65\x72\x73\x65`,IiiIIl1I=IiiIIl1I[iIIi111I]('\x76'),iIlIllll=`\x6a\x6f\x69\x6e`,(0x140802,IiiIIl1I[iIlIllll](''));});}(0x184,0x1accf,l1iI1li,0xc4),l1iI1li)&&(version_=l1iI1li);const i1Iilii1=$[lI1i1iil(0x369,'PQb3')]()?require(lI1i1iil(0x2a5,'Qx9D')):'',Il1Ii=$[lI1i1iil(0x168,'W[Dw')]()?require(lI1i1iil(0x278,'4v16')):'',Iii=require('./function/h5st41.js');let i1il11II=!![],I111llil=lI1i1iil(0x26a,'m(Y&'),ll111Il1='2256',iiiIIi11=Date[lI1i1iil(0x301,'Jjga')](),IIIii1li=[],I1I1liII='',i1l1ll1;if($[lI1i1iil(0x2aa,'4v16')]()){Object[lI1i1iil(0x1f5,'c#5x')](Il1Ii)[lI1i1iil(0x323,'EHZu')](l111li1=>{const i1lilIii=lI1i1iil;IIIii1li[i1lilIii(0x21e,'[d&2')](Il1Ii[l111li1]);});if(process[lI1i1iil(0x27e,'F^hP')][lI1i1iil(0x199,'CHl1')]&&process['env'][lI1i1iil(0x28f,'EHZu')]===lI1i1iil(0x309,'[d&2'))console[lI1i1iil(0x337,'W#4!')]=()=>{};}else IIIii1li=[$['getdata']('CookieJD'),$[lI1i1iil(0x22b,'E3EY')](lI1i1iil(0x18e,'wrxj')),...iii1i1il($[lI1i1iil(0x379,'6@Av')](lI1i1iil(0x237,'$u56'))||'[]')['map'](ll1i1ll1=>ll1i1ll1[lI1i1iil(0x1d7,'^36)')])][lI1i1iil(0x35e,'PQb3')](IiiiI1=>!!IiiiI1);!(async()=>{const lli11l1=lI1i1iil,ii11iIlI={'qLYXj':lli11l1(0x1a1,'h]fS'),'jJkHt':lli11l1(0x1af,'q%SA'),'jngnu':function(lIiIi1i,lii1IiiI){return lIiIi1i(lii1IiiI);},'mrPBu':lli11l1(0x183,'cG*$'),'ttkzn':lli11l1(0x2bb,'2H8t'),'KGHPf':function(iiiI1i,iilllIiI,iI1Ili11){return iiiI1i(iilllIiI,iI1Ili11);},'JkpfA':lli11l1(0x178,'E3EY'),'MpREu':lli11l1(0x371,'PQb3'),'TLylj':'m6v23hKm2gJAG3LeporLkw','Pqcws':lli11l1(0x254,'W#4!'),'WXujD':function(l11Ii1I,I1l11iIl){return l11Ii1I<I1l11iIl;},'RTOxA':function(IIl1111l,iiIl11Il){return IIl1111l===iiIl11Il;},'jNJVZ':lli11l1(0x2ff,']xNf'),'qJzuT':function(iiIlIiI,IIill11i){return iiIlIiI(IIill11i);},'ZqErZ':function(ill1lii1,iII1iiii){return ill1lii1+iII1iiii;},'cdfDC':function(li1iil1I,l1l1l1Il){return li1iil1I!==l1l1l1Il;},'JAbeD':lli11l1(0x32f,'Wnzr'),'pLmNF':lli11l1(0x210,'EHZu'),'YZMPe':lli11l1(0x2b7,'Rc03'),'IUShD':function(iilIiIl){return iilIiIl();},'bjneM':function(li111lli,lI1llIii,l11i11){return li111lli(lI1llIii,l11i11);},'sICkU':function(i1lI1ili,Il1li1I1){return i1lI1ili*Il1li1I1;}};if(!IIIii1li[0x0]){$['msg']($[lli11l1(0x292,'E3EY')],lli11l1(0x29a,'rd%Z'),ii11iIlI[lli11l1(0x2e6,'[d&2')],{'open-url':ii11iIlI['jJkHt']});return;}authorCodeList=await ii11iIlI[lli11l1(0x37b,'wymO')](li1IlIIi,ii11iIlI['mrPBu']);if(authorCodeList)console['log'](ii11iIlI[lli11l1(0x205,'1tXL')]),$['authorCode']=authorCodeList[ii11iIlI[lli11l1(0x1ab,'Qx9D')](iiiI1ii,0x0,authorCodeList['length'])];else{let i1liIilI=[ii11iIlI[lli11l1(0x
|
|
|
|
|
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
|