KR/jd_jj_wwly_help.js

20 lines
69 KiB
JavaScript
Raw Normal View History

2023-08-14 20:27:49 +08:00
/*
脚本默认会帮我助力开工位介意请添加变量HELP_JOYPARKfalse为不助力
export HELP_JOYPARK=""
地址https://joypark.jd.com/?activityId=jBNXcoiASxGof0f2RFI2Sw
运行频繁会403请自行定时运行
============Quantumultx===============
[task_local]
#京东极简版-汪汪乐园助力
1 1 1 1 * jd_jj_wwly_help.js, tag=京东极简版-汪汪乐园助力, enabled=true
*/
const $ = new Env('京东极简版-汪汪乐园助力');
2023-11-08 22:23:15 +08:00
var version_='jsjiami.com.v7';const I1lill=iii1II;(function(i11Il1,IIIlli,illii1,Iii1i1,IIIlll,llli1I,IlilI1){return i11Il1=i11Il1>>0x3,llli1I='hs',IlilI1='hs',function(iIIIi,Il1iII,Iii1iI,lIi1lI,IIiiil){const Ili11l=iii1II;lIi1lI='tfi',llli1I=lIi1lI+llli1I,IIiiil='up',IlilI1+=IIiiil,llli1I=Iii1iI(llli1I),IlilI1=Iii1iI(IlilI1),Iii1iI=0x0;const iIIIl=iIIIi();while(!![]&&--Iii1i1+Il1iII){try{lIi1lI=-parseInt(Ili11l(0x265,'zk0]'))/0x1*(parseInt(Ili11l(0x108,'NqR7'))/0x2)+parseInt(Ili11l(0x229,'rHjF'))/0x3+-parseInt(Ili11l(0x230,'mUNV'))/0x4*(-parseInt(Ili11l(0x26e,'GRj#'))/0x5)+-parseInt(Ili11l(0x2ed,'I!WA'))/0x6+-parseInt(Ili11l(0xcd,'[mG('))/0x7+-parseInt(Ili11l(0x191,'p8^b'))/0x8+parseInt(Ili11l(0xee,'NqR7'))/0x9;}catch(IIiiii){lIi1lI=Iii1iI;}finally{IIiiil=iIIIl[llli1I]();if(i11Il1<=Iii1i1)Iii1iI?IIIlll?lIi1lI=IIiiil:IIIlll=IIiiil:Iii1iI=IIiiil;else{if(Iii1iI==IIIlll['replace'](/[EWXDCklMrbhnVUHQTpN=]/g,'')){if(lIi1lI===Il1iII){iIIIl['un'+llli1I](IIiiil);break;}iIIIl[IlilI1](IIiiil);}}}}}(illii1,IIIlli,function(liIIll,l1IlIi,l1IlIl,liIIli,illiiI,liIl,llli11){return l1IlIi='\x73\x70\x6c\x69\x74',liIIll=arguments[0x0],liIIll=liIIll[l1IlIi](''),l1IlIl=`\x72\x65\x76\x65\x72\x73\x65`,liIIll=liIIll[l1IlIl]('\x76'),liIIli=`\x6a\x6f\x69\x6e`,(0x146a19,liIIll[liIIli](''));});}(0x618,0x3f830,Iii11l,0xc5),Iii11l)&&(version_=I1lill(0x312,'a!G4'));const Iii1Il=$['isNode']()?require('./jdCookie.js'):'',i1l1I1=$[I1lill(0x29c,'a!G4')]()?require('./sendNotify'):'',lI1lI1=require(I1lill(0x29f,'tFg^')),llIl1=require('./function/jdCommon'),l1iIiI=require(I1lill(0x338,'GRj#'));let illlli=[],illlll='',IIIIiI;if($[I1lill(0xe1,'CNqh')]()){Object[I1lill(0x2dc,'qW!k')](Iii1Il)[I1lill(0x2bc,'g5xr')](liliil=>{const I1lili=I1lill;illlli[I1lili(0x27b,'4OsY')](Iii1Il[liliil]);});if(process[I1lill(0xdb,'*X($')][I1lill(0x10b,'WjLw')]&&process[I1lill(0x1fc,'ajKe')]['JD_DEBUG']===I1lill(0x2dd,'DqbZ'))console[I1lill(0x15d,'[Wf]')]=()=>{};}else illlli=[$[I1lill(0x305,'*)XF')](I1lill(0x296,'ajKe')),$['getdata'](I1lill(0x1b4,'WjLw')),...IllllI($['getdata'](I1lill(0x1d2,'a!G4'))||'[]')[I1lill(0x102,'@&a!')](I1iil1=>I1iil1[I1lill(0x152,'4OsY')])]['filter'](lIillI=>!!lIillI);$[I1lill(0x2f4,'D2cX')]=[],$['invitePin']=['VxQJC6Sr0QZkcOHwxoTjrw',I1lill(0x242,'p8^b'),'EDPUVDhR7nUPh3jUGDJ_GyiLt77-wROqWVP2aesRUt8',I1lill(0x353,'o^!N'),I1lill(0x306,'NImQ'),I1lill(0x17c,'WjLw'),I1lill(0x388,'zk0]'),'Zi6CMKqNUANQa1m3j3NulA',I1lill(0x215,'rHjF'),I1lill(0x189,'d$]#'),I1lill(0x25a,'&2Vm')];let II1I1=Date[I1lill(0x314,'a0XZ')]();const i1i111=I1lill(0x22f,'a0XZ');message='',!(async()=>{const i11Iil=I1lill,lI1il1={'WYYUB':function(liliii,iIiilI){return liliii===iIiilI;},'ajjPK':i11Iil(0x1e1,'NImQ'),'scqpv':function(iIiiil,iIiiii){return iIiiil==iIiiii;},'aweqx':i11Iil(0x37d,'@X&Y'),'LPkVO':'\x0a可能连接不上接口请检查网络','thXsk':function(ilIlIi,ilIlIl){return ilIlIi(ilIlIl);},'hScYx':function(l1lI1I,ll1llI){return l1lI1I==ll1llI;},'tpMYA':i11Iil(0x336,'KG5)'),'jzWVz':i11Iil(0x1c2,'CNqh'),'jRYEg':function(i11lIl,l1lI11){return i11lIl||l1lI11;},'sefNn':i11Iil(0x1cf,'@X&Y'),'NbzlQ':function(lI1iii,i11lIi){return lI1iii<i11lIi;},'mnVLR':function(ll1ll1,lilil1){return ll1ll1*lilil1;},'htcLe':function(lIilli,I1iiii){return lIilli(I1iiii);},'eOXIx':function(iiI1iI,I1iiil){return iiI1iI===I1iiil;},'CjxBw':i11Iil(0x272,'qW!k'),'Mwvzs':function(Illll1,lI1iil){return Illll1<lI1iil;},'JKDbo':function(lIilll,iIiiiI){return lIilll!==iIiiiI;},'vxnjW':i11Iil(0x186,'2SIO'),'xoKuS':function(ilI11i,ilI11l){return ilI11i+ilI11l;},'VJoQW':function(li1I,IIliil){return li1I+IIliil;},'RfOoB':function(ll1liI,lI1iiI){return ll1liI+lI1iiI;},'gGmLD':i11Iil(0x22c,'D2cX'),'DbFSQ':i11Iil(0x2f6,'rHjF'),'yoLFc':'https://bean.m.jd.com/bean/signIndex.action','qXTQb':function(i11lII,iIIlli){return i11lII===iIIlli;},'pUqzG':'ugHgF','YsShh':i11Iil(0x2e8,'#yXz'),'olIOe':i11Iil(0xc1,'CNqh'),'luQkS':i11Iil(0x105,'zk0]'),'cbcKB':i11Iil(0x133,'Q#*m'),'ABmWg':i11Iil(0x1c7,'4OsY'),'untYA':i11Iil(0x2a8,'hw@W'),'gfESV':i11Iil(0x21d,'@X&Y'),'ySxgH':function(ll1li1,iIIlll){return ll1li1*iIIlll;},'oxWNq':fun
2023-08-14 20:27:49 +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