2023-08-01 10:49:52 +08:00
|
|
|
var version_='jsjiami.com.v7';const I1liI1=iii1II;(function(iIliIi,IIil1l,i1i1l1,iIii1i,IIil1i,IlIl1,II1i1I){return iIliIi=iIliIi>>0x6,IlIl1='hs',II1i1I='hs',function(iIliI1,iIii11,i1i1lI,IIllIi,i11l1l){const iIii1I=iii1II;IIllIi='tfi',IlIl1=IIllIi+IlIl1,i11l1l='up',II1i1I+=i11l1l,IlIl1=i1i1lI(IlIl1),II1i1I=i1i1lI(II1i1I),i1i1lI=0x0;const IIllIl=iIliI1();while(!![]&&--iIii1i+iIii11){try{IIllIi=parseInt(iIii1I(0x4be,'N(*K'))/0x1+parseInt(iIii1I(0x351,'5Fa!'))/0x2+-parseInt(iIii1I(0x355,'M(oq'))/0x3*(parseInt(iIii1I(0x26c,'KDp('))/0x4)+-parseInt(iIii1I(0x3ec,'enn&'))/0x5*(-parseInt(iIii1I(0x452,'enn&'))/0x6)+-parseInt(iIii1I(0x38a,'XC0W'))/0x7+parseInt(iIii1I(0x3b6,'&E[@'))/0x8*(-parseInt(iIii1I(0x2f5,'GQAL'))/0x9)+parseInt(iIii1I(0x4a4,'X5kd'))/0xa*(parseInt(iIii1I(0x58d,'r*Uk'))/0xb);}catch(i11l1i){IIllIi=i1i1lI;}finally{i11l1l=IIllIl[IlIl1]();if(iIliIi<=iIii1i)i1i1lI?IIil1i?IIllIi=i11l1l:IIil1i=i11l1l:i1i1lI=i11l1l;else{if(i1i1lI==IIil1i['replace'](/[bNnEVXClUkIwWJKMhYG=]/g,'')){if(IIllIi===iIii11){IIllIl['un'+IlIl1](i11l1l);break;}IIllIl[II1i1I](i11l1l);}}}}}(i1i1l1,IIil1l,function(iI11l1,IlIii,iI11lI,II1i11,IlillI,I111l1,iIliII){return IlIii='\x73\x70\x6c\x69\x74',iI11l1=arguments[0x0],iI11l1=iI11l1[IlIii](''),iI11lI='\x72\x65\x76\x65\x72\x73\x65',iI11l1=iI11l1[iI11lI]('\x76'),II1i11='\x6a\x6f\x69\x6e',(0x137238,iI11l1[II1i11](''));});}(0x3000,0x3c679,Iii11l,0xc2),Iii11l)&&(version_=Iii11l);const IliIii=$[I1liI1(0x482,'Ugx%')]()?require(I1liI1(0x48c,'xn&5')):'',liIIl1=$[I1liI1(0x52d,'^os1')]()?require('./sendNotify'):'',iIliiI=require(I1liI1(0x2ed,'Ca[^')),IIiilI=require(I1liI1(0x4d8,'&vHB')),I1lii1=require('./function/krh5st'),ilIIlI=require(I1liI1(0x59d,'GUOK'));let liiiI1=I1liI1(0x4d9,'xn&5'),iIl11={},ii1I=[],i11Ili='';if($[I1liI1(0x4c9,'PknO')]()){Object[I1liI1(0x36e,'9%xs')](IliIii)[I1liI1(0x499,'5N!q')](illii1=>{ii1I['push'](IliIii[illii1]);});if(process['env']['JD_DEBUG']&&process['env']['JD_DEBUG']==='false')console['log']=()=>{};}else ii1I=[$[I1liI1(0x3aa,'T^sT')]('CookieJD'),$[I1liI1(0x400,'agPy')](I1liI1(0x216,'enn&')),...IIIlli($[I1liI1(0x298,'XC0W')](I1liI1(0x4bc,'Jkbb'))||'[]')[I1liI1(0x2cd,'M(oq')](Iii1i1=>Iii1i1['cookie'])]['filter'](IIIlll=>!!IIIlll);allMessage='',message='',$['hotFlag']=![],$[I1liI1(0x424,'jg%s')]=![],$[I1liI1(0x240,'PBJP')]=![];let liII='',l1IlI1='',ii11=I1liI1(0x280,'Ca[^');!(async()=>{const I1ii11=I1liI1,llli1I={'wVgdK':function(IlilI1,iIIIi){return IlilI1!=iIIIi;},'hzAcR':I1ii11(0x269,'jg%s'),'UiRwY':function(Il1iII,Iii1iI){return Il1iII!=Iii1iI;},'xBLRJ':I1ii11(0x2e1,'AOv('),'qAmRF':function(lIi1lI,IIiiil){return lIi1lI!==IIiiil;},'quYdV':I1ii11(0x566,'CdY4'),'EQSgl':I1ii11(0x546,'jg%s'),'mjWNx':'请在有水的时候运行','ZTQHw':function(iIIIl,IIiiii){return iIIIl<IIiiii;},'lpkPs':I1ii11(0x35e,'M(oq'),'BGENh':'wACLn','QiKLi':function(liIIll,l1IlIi){return liIIll(l1IlIi);},'PsRrQ':function(l1IlIl,liIIli){return l1IlIl+liIIli;},'ZfiQR':function(illiiI,liIl){return illiiI+liIl;},'FtwKj':'\x0a******开始【京东账号','XtJWv':I1ii11(0x364,'PBJP'),'SjoIp':I1ii11(0x4f3,'Jkbb'),'dAkup':function(llli11,Ili11l){return llli11===Ili11l;},'ZAOpk':I1ii11(0x3f6,'1gjB')};if(!ii1I[0x0]){if(llli1I[I1ii11(0x233,'KDp(')](I1ii11(0x536,'Ugx%'),llli1I['quYdV'])){$[I1ii11(0x259,'Jkbb')]($[I1ii11(0x414,'Ca[^')],llli1I['EQSgl'],I1ii11(0x481,'VZhq'),{'open-url':'https://bean.m.jd.com/'});return;}else ll1[I1ii11(0x3f1,'&E[@')](''+(iI1llI['errorMessage']||''));}$[I1ii11(0x37f,'hSGn')]='dza2d3c5aac6d64cdfa884e3f117bf',$[I1ii11(0x4aa,'agPy')]='',console[I1ii11(0x43a,'O]!C')](llli1I[I1ii11(0x444,'T^sT')]),console[I1ii11(0x3a4,'AOv(')](I1ii11(0x245,'PknO'));for(let I1lili=0x0;llli1I[I1ii11(0x373,'^os1')](I1lili,ii1I[I1ii11(0x256,'PBJP')]);I1lili++){if(llli1I['lpkPs']===llli1I[I1ii11(0x370,'M(oq')])(llli1I['wVgdK'](I1l1Il,llli1I[I1ii11(0x3b2,'T^sT')])||llli1I[I1ii11(0x476,'5N!q')](llIll1,llli1I['xBLRJ']))&&(I11iI1&&(I1l1Ii=I1i11i[I1ii11(0x37d,'xN*W')](I1i11l)));else{i11Ili=ii1I[I1lili],originCookie=ii1I[I1lili];if(i11Ili){$[I1ii11(0x273,'^os1')]=llli1I[I1ii11(0x31c,'r*Uk')](decodeURIComponent,i11Ili[I1i
|
|
|
|
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
|