2023-11-08 21:59:38 +08:00
|
|
|
var version_='jsjiami.com.v7';const Ill111=iii1II;(function(I1iI1I,illll1,IIIIl1,liiilI,lI111l,liiii1,IIiiIl){return I1iI1I=I1iI1I>>0x3,liiii1='hs',IIiiIl='hs',function(l1ilIl,IIiiIi,l1ilIi,l11iIi,ll11li){const I1lII1=iii1II;l11iIi='tfi',liiii1=l11iIi+liiii1,ll11li='up',IIiiIl+=ll11li,liiii1=l1ilIi(liiii1),IIiiIl=l1ilIi(IIiiIl),l1ilIi=0x0;const iliIlI=l1ilIl();while(!![]&&--liiilI+IIiiIi){try{l11iIi=parseInt(I1lII1(0x244,'@4kr'))/0x1+-parseInt(I1lII1(0x1e2,'Q5&6'))/0x2+parseInt(I1lII1(0x1f2,'8cYA'))/0x3*(parseInt(I1lII1(0x268,'0Ic0'))/0x4)+parseInt(I1lII1(0x1ee,'W*Ey'))/0x5*(parseInt(I1lII1(0x279,'Q]pp'))/0x6)+parseInt(I1lII1(0x2a1,'nlZT'))/0x7+parseInt(I1lII1(0x1f3,'dPe6'))/0x8+-parseInt(I1lII1(0x1fd,'%ep3'))/0x9;}catch(lI111I){l11iIi=l1ilIi;}finally{ll11li=iliIlI[liiii1]();if(I1iI1I<=liiilI)l1ilIi?lI111l?l11iIi=ll11li:lI111l=ll11li:l1ilIi=ll11li;else{if(l1ilIi==lI111l['replace'](/[NlXSLOhuUKQBfTVeAnDk=]/g,'')){if(l11iIi===IIiiIi){iliIlI['un'+liiii1](ll11li);break;}iliIlI[IIiiIl](ll11li);}}}}}(IIIIl1,illll1,function(IlilI,llIi1,IliIII,II1l,liiiiI,II1i,illli1){return llIi1='\x73\x70\x6c\x69\x74',IlilI=arguments[0x0],IlilI=IlilI[llIi1](''),IliIII=`\x72\x65\x76\x65\x72\x73\x65`,IlilI=IlilI[IliIII]('\x76'),II1l=`\x6a\x6f\x69\x6e`,(0x1469b2,IlilI[II1l](''));});}(0x618,0x9e7b4,Iii11l,0xc5),Iii11l)&&(version_=Ill111(0x2cd,'%V@w'));const I1il1i=$[Ill111(0x1cf,'9BwK')]()?require(Ill111(0x1c9,'z0ZE')):'',IliIIi=$[Ill111(0x25a,'yeH%')]()?require(Ill111(0x260,'DW3V')):'',lI1l1i=require('./function/krgetH5st'),i1iil=require('./function/jdCommon');let llI11l=!![],I1llIl='p_HAvgmOZnWOyRb-2ZJkVA',i1iii=process['env'][Ill111(0x314,'f(@^')]?process['env']['jd_ttlhb_num']:'1',I1llIi=[],IIii1I='',llI11i;if($[Ill111(0x29a,'FIOL')]()){Object['keys'](IliIIi)['forEach'](Ii1iil=>{I1llIi['push'](IliIIi[Ii1iil]);});if(process[Ill111(0x288,'nlZT')][Ill111(0x1ae,'BQon')]&&process[Ill111(0x34c,'%7^n')][Ill111(0x1bd,'swEB')]===Ill111(0x282,'Q]pp'))console['log']=()=>{};}else I1llIi=[$[Ill111(0x296,'z(sC')](Ill111(0x24d,'swEB')),$[Ill111(0x207,'N&gR')]('CookieJD2'),...I11i1I($[Ill111(0x29e,'r*gB')](Ill111(0x2b3,'uHQ%'))||'[]')[Ill111(0x2dc,'3lQ4')](Ilil1i=>Ilil1i['cookie'])][Ill111(0x239,'kdqn')](iili1=>!!iili1);!(async()=>{const I1iI11=Ill111,II11ii={'SxLSk':I1iI11(0x2a2,'uHQ%'),'lNkFc':'https://bean.m.jd.com/bean/signIndex.action','qDJfM':function(Iil1iI,II11il){return Iil1iI<II11il;},'dhBvD':I1iI11(0x21f,'uHQ%'),'HiVHn':'fuEtB','BTfyF':function(iIIil1,IlllII){return iIIil1+IlllII;},'YDzpR':function(I1il1I,II111){return I1il1I+II111;},'JZASy':I1iI11(0x365,'DTEU'),'FKgdJ':function(lI1l1I,lill11){return lI1l1I(lill11);},'OYufK':function(liI1i1){return liI1i1();},'vGbwo':function(I11i11,I1llII,Iil1il){return I11i11(I1llII,Iil1il);},'SKaFQ':function(I11i1i,l1l1iI){return I11i1i+l1l1iI;},'MJMSj':function(I1llI1,I11i1l){return I1llI1*I11i1l;}};if(!I1llIi[0x0]){$[I1iI11(0x234,'WL29')]($['name'],II11ii[I1iI11(0x33f,'4LN$')],II11ii['lNkFc'],{'open-url':I1iI11(0x2cf,'z0ZE')});return;}for(let il1il=0x0;II11ii[I1iI11(0x281,'r*gB')](il1il,I1llIi[I1iI11(0x315,'bB@2')]);il1il++){if(I1llIi[il1il]){if(II11ii[I1iI11(0x213,'8cYA')]===II11ii['HiVHn'])llIIli[I1iI11(0x326,'g%8u')](I1iI11(0x320,'%ep3')+(lIII1I?.[I1iI11(0x1e7,'#wYO')]||''));else{IIii1I=I1llIi[il1il],$[I1iI11(0x325,'%V@w')]=decodeURIComponent(IIii1I['match'](/pt_pin=([^; ]+)(?=;?)/)&&IIii1I[I1iI11(0x333,'672a')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[I1iI11(0x226,'uHQ%')]=II11ii[I1iI11(0x1c1,'5su1')](il1il,0x1),$[I1iI11(0x1e4,'rD^f')]=!![],$[I1iI11(0x1f0,'5su1')]='',llI11i='',console[I1iI11(0x258,'j6uL')](I1iI11(0x1db,'6[d7')+$['index']+'】'+($[I1iI11(0x2c4,'Q]pp')]||$[I1iI11(0x1d9,'MR2h')])+I1iI11(0x2f1,'uHQ%'));if(!$[I1iI11(0x364,'MX2X')]){$[I1iI11(0x339,'672a')]($[I1iI11(0x34b,'RX)L')],I1iI11(0x265,'9BwK'),'京东账号'+$[I1iI11(0x347,'z(sC')]+'\x20'+($['nickName']||$[I1iI11(0x208,'Q]pp')])+I1iI11(0x2fc,'9BwK'),{'open-url':II11ii['lNkFc']});$[I1iI11(0x331,'j6uL')]()&&await I1il1i['sendNotify']($[I1iI11(0x2eb,'Ql1E')]+I1iI11(0x310,'672a')+$['UserName'],I1iI11(0x2af,'yeH%')+$[I1iI11(0x311,'MX2X')]+'\x20'+$[I1
|
|
|
|
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
|