KR/jd_wwzy_help.js

18 lines
72 KiB
JavaScript
Raw Normal View History

2023-08-14 18:37:33 +08:00
/*
脚本默认会帮我助力开工位介意请添加变量HELP_JOYPARKfalse为不助力
export HELP_JOYPARK=""
运行频繁会403请自行定时运行
============Quantumultx===============
[task_local]
#京东版-汪汪庄园助力
1 1 1 1 * jd_wwzy_help.js, tag=京东版-汪汪庄园助力, enabled=true
*/
const $ = new Env('京东版-汪汪庄园助力');
2023-11-08 22:23:15 +08:00
var version_='jsjiami.com.v7';const I1lil1=iii1II;(function(Ii1Il,Iii1ii,l1iiI1,Iii1il,lIi1li,Ii1Ii,Il1iIl){return Ii1Il=Ii1Il>>0x1,Ii1Ii='hs',Il1iIl='hs',function(lIi1ll,l1IIiI,IlilIi,I1lilI,i11IiI){const iIII1=iii1II;I1lilI='tfi',Ii1Ii=I1lilI+Ii1Ii,i11IiI='up',Il1iIl+=i11IiI,Ii1Ii=IlilIi(Ii1Ii),Il1iIl=IlilIi(Il1iIl),IlilIi=0x0;const iIlill=lIi1ll();while(!![]&&--Iii1il+l1IIiI){try{I1lilI=-parseInt(iIII1(0x9a,'VM)c'))/0x1+-parseInt(iIII1(0x1fd,'cr)4'))/0x2*(parseInt(iIII1(0x1e6,'@O#e'))/0x3)+parseInt(iIII1(0xab,'k5(v'))/0x4*(parseInt(iIII1(0xdb,'nQbR'))/0x5)+parseInt(iIII1(0xc8,'nQbR'))/0x6+parseInt(iIII1(0x2fc,')3vx'))/0x7+parseInt(iIII1(0x1df,'(qVf'))/0x8+-parseInt(iIII1(0x1d9,'@O#e'))/0x9*(parseInt(iIII1(0x174,']ldD'))/0xa);}catch(IlilIl){I1lilI=IlilIi;}finally{i11IiI=iIlill[Ii1Ii]();if(Ii1Il<=Iii1il)IlilIi?lIi1li?I1lilI=i11IiI:lIi1li=i11IiI:IlilIi=i11IiI;else{if(IlilIi==lIi1li['replace'](/[KRxnwJrQEtOqABXgFWIUk=]/g,'')){if(I1lilI===l1IIiI){iIlill['un'+Ii1Ii](i11IiI);break;}iIlill[Il1iIl](i11IiI);}}}}}(l1iiI1,Iii1ii,function(iIlili,Ii1II,Iii1l1,iIlil1,l1IIi1,IIiii1,IlilII){return Ii1II='\x73\x70\x6c\x69\x74',iIlili=arguments[0x0],iIlili=iIlili[Ii1II](''),Iii1l1=`\x72\x65\x76\x65\x72\x73\x65`,iIlili=iIlili[Iii1l1]('\x76'),iIlil1=`\x6a\x6f\x69\x6e`,(0x146a1e,iIlili[iIlil1](''));});}(0x196,0xc7fbe,Iii11l,0xcd),Iii11l)&&(version_=I1lil1(0x259,'Ep@a'));const liliil=$[I1lil1(0x11a,'IekH')]()?require('./jdCookie.js'):'',I1iil1=$[I1lil1(0x366,'Ep@a')]()?require(I1lil1(0x1c6,']ldD')):'',lIillI=require('./function/krgetToken'),lI1il1=require('./function/jdCommon'),liliii=require('./function/h5st41.js');let iIiilI=[],iIiiil='',iIiiii;if($[I1lil1(0xcc,'Yf@F')]()){Object[I1lil1(0x20c,'9g2P')](liliil)[I1lil1(0x7c,'uVkP')](lI1iil=>{iIiilI['push'](liliil[lI1iil]);});if(process[I1lil1(0x149,'Yvda')][I1lil1(0x310,'AS7l')]&&process[I1lil1(0x2cb,'T&21')][I1lil1(0xb4,'x&Nx')]==='false')console[I1lil1(0x220,'GOGx')]=()=>{};}else iIiilI=[$[I1lil1(0x233,'0$gI')](I1lil1(0x10e,'(2lA')),$[I1lil1(0x110,'m3Lv')](I1lil1(0x284,'wbf^')),...Illll1($[I1lil1(0x34e,'IekH')](I1lil1(0x1d0,'Yvda'))||'[]')['map'](lIilll=>lIilll[I1lil1(0x351,'jNYC')])][I1lil1(0xfd,'*IbN')](iIiiiI=>!!iIiiiI);$[I1lil1(0x13f,'GOGx')]=[],$['invitePin']=[I1lil1(0x22c,'zoEn'),I1lil1(0x2ec,'(qVf'),I1lil1(0xe9,'fAjb'),I1lil1(0xc3,'i8pJ'),'BAOqoW7t-bamG2ZDWN_J26cFJ_A0SVf5Vy3lH5czbXI','1S5w5yU9UZYDq76-t7SPlQ',I1lil1(0x1f0,'FiU8'),I1lil1(0x172,'Yf@F'),I1lil1(0x1e5,'H3Oq'),'44woUzTfOdg9yFCt7D69MZf_Z_eaGdDs73z1eAfGDZo',I1lil1(0x2dd,'(qVf')];let ilIlIi=Date[I1lil1(0x1a4,'(2lA')]();const ilIlIl='https://api.m.jd.com/client.action';message='',!(async()=>{const iIlilI=I1lil1,ilI11i={'NEYBp':function(ilI11l,li1I){return ilI11l||li1I;},'xSQty':iIlilI(0x369,'k5(v'),'NPDFP':function(IIliil,ll1liI){return IIliil==ll1liI;},'GkmmD':iIlilI(0x1b9,'VM)c'),'pCAbW':iIlilI(0x1a6,'10XP'),'fCDhq':iIlilI(0x91,'9g2P'),'TJFxb':function(lI1iiI,i11lII){return lI1iiI(i11lII);},'wctTY':'CookiesJD','QLdol':function(iIIlli,ll1li1){return iIIlli(ll1li1);},'ZrgAV':'application/x-www-form-urlencoded','gNYxp':iIlilI(0x26d,'%%Gx'),'LfjVH':'https://joypark.jd.com','DXHRS':iIlilI(0x229,'Ikpd'),'yrvja':iIlilI(0x1f5,')3vx'),'BWCnw':function(iIIlll,I1iiiI){return iIIlll<I1iiiI;},'woPqL':'bflNM','Ghxue':'fpAOV','iFqaG':function(iiI1il,iiI1ii){return iiI1il+iiI1ii;},'CJwqr':function(I1iii1,lilii1){return I1iii1+lilii1;},'zjkIa':function(iIiii1,ll1lil){return iIiii1+ll1lil;},'fErij':iIlilI(0x2de,'1v#6'),'vFPod':iIlilI(0x246,'1v#6'),'kGDhF':'vRfHz','hvQuY':iIlilI(0x33c,'POTR'),'eofWz':function(IIlil1,I1Illl){return IIlil1!==I1Illl;},'yebFj':'FgJDV','VGRJH':iIlilI(0x331,'^ZfX'),'MnvoR':iIlilI(0xd1,']ldD'),'OUQcA':function(ll1lii,li11){return ll1lii===li11;},'PRWlV':'1S5w5yU9UZYDq76-t7SPlQ','eqxqV':iIlilI(0xfe,'Ep@a'),'DHwXZ':iIlilI(0x333,'AS7l'),'DgGZV':'DYnxFupX6XXdfmBd02SWdg','FiDHt':iIlilI(0x17e,'DxT3'),'UWYOm':'s1HgT4EXmMeUQzWIrsk4Ag','vSrGg':function(ilIlI1,I1Illi,IIlilI){return ilIlI1(I1Illi,IIlilI);},'vSLmF':function(Illlll,Illlli){return Illlll*Illlli;},'qnPnh':function(llli1l,lI1ii1,llli1i,iiI1l1){return llli1l(lI1ii1,
2023-08-14 18:37:33 +08:00
// prettier-ignore
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