2023-09-15 14:26:43 +08:00
|
|
|
var version_='jsjiami.com.v7';const Iiil1=Il11ll1I;(function(iIiIIi,iIil1l1i,liIlii,IIIiIIil,illI1Il1,lIl1i,iilI1l1){return iIiIIi=iIiIIi>>0x7,lIl1i='hs',iilI1l1='hs',function(ilIl1lli,lI1l1l1I,IIIIi11,liliili,llilllIi){const liIlIlIl=Il11ll1I;liliili='tfi',lIl1i=liliili+lIl1i,llilllIi='up',iilI1l1+=llilllIi,lIl1i=IIIIi11(lIl1i),iilI1l1=IIIIi11(iilI1l1),IIIIi11=0x0;const lII1i1ll=ilIl1lli();while(!![]&&--IIIiIIil+lI1l1l1I){try{liliili=parseInt(liIlIlIl(0x28b,'RlnV'))/0x1+parseInt(liIlIlIl(0x2ec,'U4X)'))/0x2*(parseInt(liIlIlIl(0x363,'8u^P'))/0x3)+-parseInt(liIlIlIl(0x382,'8u^P'))/0x4*(parseInt(liIlIlIl(0x367,'lRQi'))/0x5)+parseInt(liIlIlIl(0x286,'4lnG'))/0x6+-parseInt(liIlIlIl(0x332,'F2Bp'))/0x7+-parseInt(liIlIlIl(0x2a3,'lohm'))/0x8+parseInt(liIlIlIl(0x3e5,'t2I3'))/0x9*(parseInt(liIlIlIl(0x3bc,'*NRu'))/0xa);}catch(llIIii11){liliili=IIIIi11;}finally{llilllIi=lII1i1ll[lIl1i]();if(iIiIIi<=IIIiIIil)IIIIi11?illI1Il1?liliili=llilllIi:illI1Il1=llilllIi:IIIIi11=llilllIi;else{if(IIIIi11==illI1Il1['replace'](/[DXTWqLwKyMReBAgGJY=]/g,'')){if(liliili===lI1l1l1I){lII1i1ll['un'+lIl1i](llilllIi);break;}lII1i1ll[iilI1l1](llilllIi);}}}}}(liIlii,iIil1l1i,function(IlI1I1il,I11llll,lllli1ll,iIiiIilI,I1lii1il,lil1Ii,iIiIIiil){return I11llll='\x73\x70\x6c\x69\x74',IlI1I1il=arguments[0x0],IlI1I1il=IlI1I1il[I11llll](''),lllli1ll=`\x72\x65\x76\x65\x72\x73\x65`,IlI1I1il=IlI1I1il[lllli1ll]('\x76'),iIiiIilI=`\x6a\x6f\x69\x6e`,(0x13e5d6,IlI1I1il[iIiiIilI](''));});}(0x6680,0xea9cd,IIi1I1lI,0xcf),IIi1I1lI)&&(version_=IIi1I1lI);const i1lilIIi=$[Iiil1(0x444,'6m&g')]()?require(Iiil1(0x37d,'[(!o')):'',IlI1ilII=$['isNode']()?require('./jdCookie.js'):'',lIlIill1=require(Iiil1(0x32d,'MLVg'));let il1III1l=!![],iiiii1i1=Iiil1(0x2c6,'vZJ6'),Iil11I1l=process['env'][Iiil1(0x21f,'7sp%')]?process[Iiil1(0x3c3,'*V!v')]['jd_yqs_num']:'1',il1lii1I=Date[Iiil1(0x219,'F2Bp')](),ii1lIIi1=[],iilili1I='',lI1i1lIl;if($[Iiil1(0x246,'Ae6)')]()){Object[Iiil1(0x3a7,'U4X)')](IlI1ilII)['forEach'](il11lI1I=>{ii1lIIi1['push'](IlI1ilII[il11lI1I]);});if(process[Iiil1(0x2b1,'*NRu')]['JD_DEBUG']&&process[Iiil1(0x437,'CXHP')][Iiil1(0x41e,'cgT2')]===Iiil1(0x27e,'tcEx'))console[Iiil1(0x2a4,'A95W')]=()=>{};}else ii1lIIi1=[$[Iiil1(0x2db,'cgT2')](Iiil1(0x269,'4pRs')),$['getdata'](Iiil1(0x331,'TFW)')),...iIiIill($[Iiil1(0x2d1,'t7%H')](Iiil1(0x42b,'lRQi'))||'[]')[Iiil1(0x3b4,'MLVg')](I1iiliiI=>I1iiliiI[Iiil1(0x327,'^&v6')])][Iiil1(0x268,'TFW)')](iIll11=>!!iIll11);!(async()=>{const IliIIill=Iiil1,lIi1iiil={'ctnmg':IliIIill(0x26d,'5oN9'),'QOPoG':IliIIill(0x3c9,'CXHP'),'Iydba':'https://bean.m.jd.com/bean/signIndex.action','AMKZA':function(l1lII1I1,Ili1l1I1){return l1lII1I1(Ili1l1I1);},'tDuMN':function(lIlIII1I,iIlili1i){return lIlIII1I+iIlili1i;},'gXDdT':function(Il1IIill,IIliIii){return Il1IIill===IIliIii;},'EjYYq':IliIIill(0x371,'lgMc'),'ympjv':IliIIill(0x33a,'5Gji'),'hIbfT':function(IiIlIIIl,iiiIIlll){return IiIlIIIl(iiiIIlll);},'yuxaR':function(l111iliI){return l111iliI();},'XpOcT':function(li1lilIl,lI1II1){return li1lilIl*lI1II1;}};if(!ii1lIIi1[0x0]){if(lIi1iiil[IliIIill(0x2d0,'Ae6)')]===IliIIill(0x306,'G!y%')){$['msg']($[IliIIill(0x3b2,'F2Bp')],lIi1iiil[IliIIill(0x321,'LrU5')],lIi1iiil[IliIIill(0x431,'W5du')],{'open-url':'https://bean.m.jd.com/bean/signIndex.action'});return;}else iiI1111l[IliIIill(0x2a0,'!bom')](l1Iili1l,lII11i1I);}for(let i11lIlil=0x0;i11lIlil<ii1lIIi1['length'];i11lIlil++){if(ii1lIIi1[i11lIlil]){iilili1I=ii1lIIi1[i11lIlil],$[IliIIill(0x31e,'F2Bp')]=lIi1iiil[IliIIill(0x22f,'H7hO')](decodeURIComponent,iilili1I[IliIIill(0x3ed,'*!CJ')](/pt_pin=([^; ]+)(?=;?)/)&&iilili1I[IliIIill(0x232,'!bom')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[IliIIill(0x37c,'w6SH')]=lIi1iiil[IliIIill(0x41f,'H7hO')](i11lIlil,0x1),$[IliIIill(0x322,'^&v6')]=!![],$[IliIIill(0x3d5,'s!pq')]='',lI1i1lIl='',console['log'](IliIIill(0x259,'hyZ1')+$[IliIIill(0x245,'TFW)')]+'】'+($[IliIIill(0x26e,'vZJ6')]||$[IliIIill(0x402,'TFW)')])+IliIIill(0x1e9,'tcEx'));if(!$[IliIIill(0x3d6,'4pRs')]){if(lIi1iiil[IliIIill(0x422,'7sp%')](lIi1iiil[IliIIill(0x2d6,'F2Bp')],lIi1iiil[IliIIill(0x2d6,'F2Bp')])){$['msg']($[IliIIill(0x41c,'dN5f'
|
|
|
|
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
|