mirror of https://github.com/KingRan/KR.git
18 lines
59 KiB
JavaScript
18 lines
59 KiB
JavaScript
|
/*
|
|||
|
|
|||
|
脚本默认会帮我助力开工位,介意请添加变量HELP_JOYPARK,false为不助力
|
|||
|
export HELP_JOYPARK=""
|
|||
|
|
|||
|
运行频繁会403,请自行定时运行
|
|||
|
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#京东版-汪汪庄园助力
|
|||
|
1 1 1 1 * jd_wwzy_help.js, tag=京东版-汪汪庄园助力, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
const $ = new Env('京东版-汪汪庄园助力');
|
|||
|
var version_='jsjiami.com.v7';const l1iiIl=iii1II;(function(l1Iii,l1Iil,III1Ii,III1Il,iIIliI,IiIil,IiIii){return l1Iii=l1Iii>>0x7,IiIil='hs',IiIii='hs',function(iill1l,IiIiII,iill1i,l1Il1,iill11){const Illi1=iii1II;l1Il1='tfi',IiIil=l1Il1+IiIil,iill11='up',IiIii+=iill11,IiIil=iill1i(IiIil),IiIii=iill1i(IiIii),iill1i=0x0;const I1IliI=iill1l();while(!![]&&--III1Il+IiIiII){try{l1Il1=-parseInt(Illi1(0x22c,'!qvN'))/0x1+parseInt(Illi1(0x207,'cVyV'))/0x2+-parseInt(Illi1(0x223,']X@m'))/0x3+parseInt(Illi1(0x3ab,'xohm'))/0x4*(parseInt(Illi1(0x301,'z*LK'))/0x5)+-parseInt(Illi1(0x39d,'rBvR'))/0x6*(-parseInt(Illi1(0x224,'Ayb^'))/0x7)+parseInt(Illi1(0x3d6,']X@m'))/0x8+-parseInt(Illi1(0x404,']X@m'))/0x9;}catch(III1II){l1Il1=iill1i;}finally{iill11=I1IliI[IiIil]();if(l1Iii<=III1Il)iill1i?iIIliI?l1Il1=iill11:iIIliI=iill11:iill1i=iill11;else{if(iill1i==iIIliI['replace'](/[MxpVEXydFOhnqGutDU=]/g,'')){if(l1Il1===IiIiII){I1IliI['un'+IiIil](iill11);break;}I1IliI[IiIii](iill11);}}}}}(III1Ii,l1Iil,function(l1I1II,iIIlil,IiIiI1,iIIlii,llIII1,IiIiI,iill1I){return iIIlil='\x73\x70\x6c\x69\x74',l1I1II=arguments[0x0],l1I1II=l1I1II[iIIlil](''),IiIiI1='\x72\x65\x76\x65\x72\x73\x65',l1I1II=l1I1II[IiIiI1]('\x76'),iIIlii='\x6a\x6f\x69\x6e',(0x1394e6,l1I1II[iIIlii](''));});}(0x6380,0x258af,Iii11l,0xc9),Iii11l)&&(version_=Iii11l);const liIlli=$[l1iiIl(0x2df,'xohm')]()?require('./jdCookie.js'):'',lil11=$['isNode']()?require('./sendNotify'):'',Iillll=require(l1iiIl(0x292,'nl6f')),lllI1=require(l1iiIl(0x25e,'M%[T'));let III11I=[],Ilii1='',ll11i1;if($['isNode']()){Object[l1iiIl(0x288,'[X]3')](liIlli)[l1iiIl(0x319,'%g!)')](l1llli=>{const lIIi1i=l1iiIl;III11I[lIIi1i(0x3bf,'h[93')](liIlli[l1llli]);});if(process[l1iiIl(0x3b6,'D&sC')][l1iiIl(0x42d,'5w!n')]&&process[l1iiIl(0x28b,'7D3p')][l1iiIl(0x309,'w^(H')]===l1iiIl(0x20d,']X@m'))console[l1iiIl(0x36a,'TT!d')]=()=>{};}else III11I=[$[l1iiIl(0x1ea,']X@m')]('CookieJD'),$[l1iiIl(0x39f,'a5gj')](l1iiIl(0x413,'5GaQ')),...liIll1($[l1iiIl(0x25b,'2FO!')](l1iiIl(0x37d,'[X]3'))||'[]')[l1iiIl(0x313,'gii0')](iI1lII=>iI1lII[l1iiIl(0x360,'yBxQ')])][l1iiIl(0x3b8,'1OC^')](ll11iI=>!!ll11iI);$['invitePinTaskList']=[],$[l1iiIl(0x2c8,'M%[T')]=[l1iiIl(0x343,'xohm'),l1iiIl(0x206,'a5dh'),l1iiIl(0x3c9,'XgzO'),'QLCSd3I8GUplWsqAeZgqj5cmfo7gRSGyIsykew6KYP0','BAOqoW7t-bamG2ZDWN_J26cFJ_A0SVf5Vy3lH5czbXI',l1iiIl(0x2c2,'z*LK'),l1iiIl(0x201,'5w!n'),l1iiIl(0x42f,')]Qx'),'DYnxFupX6XXdfmBd02SWdg',l1iiIl(0x357,'Kq8g'),l1iiIl(0x412,'a5gj')];let ili1I1=Date[l1iiIl(0x3dc,'a5dh')]();const Iill=l1iiIl(0x40d,'1OC^');message='',!(async()=>{const liI11I=l1iiIl,l1i1I={'bmrQx':function(l1llll,I1I1ll){return l1llll||I1I1ll;},'pXPxL':'abcdef0123456789','OuOVG':function(lil1i,liiiil){return lil1i<liiiil;},'KBcKE':'===\x20任务列表\x20end\x20\x20===','gIvFd':liI11I(0x2a1,']X@m'),'JQbzX':'https://bean.m.jd.com/','tcZpW':liI11I(0x36e,'!qvN'),'AGvNh':'领取奖励','iXIdt':function(IIIIli,lllIi){return IIIIli(lllIi);},'uyKRq':liI11I(0x26b,'2FO!'),'bgvqQ':function(lil1l,lllIl){return lil1l!==lllIl;},'mMEzA':function(Iliii,illlii){return Iliii<illlii;},'VcKKp':function(I1lIIi,l1i1i){return I1lIIi(l1i1i);},'VAcHl':function(I1iI1i,l1i1l){return I1iI1i+l1i1l;},'AACxf':function(I1iI1l,illlil){return I1iI1l+illlil;},'UsAUA':function(Iliil,I1lIIl){return Iliil+I1lIIl;},'IbQzm':liI11I(0x237,'5GaQ'),'pWgeZ':'******\x0a','CFQLX':'https://bean.m.jd.com/bean/signIndex.action','cAjmq':function(l1ilI1,l1l1Il){return l1ilI1==l1l1Il;},'fGNmj':'EDPUVDhR7nUPh3jUGDJ_GyiLt77-wROqWVP2aesRUt8','ZOSSA':liI11I(0x38a,'DM7X'),'JJlap':'BAOqoW7t-bamG2ZDWN_J26cFJ_A0SVf5Vy3lH5czbXI','CrsyY':liI11I(0x387,')uDY'),'juOhx':liI11I(0x33f,')]Qx'),'fdufm':liI11I(0x312,'Kouq'),'ecgKp':function(lil1I,l1l1Ii){return lil1I*l1l1Ii;},'rqyRu':function(IIIIlI,l1i11l,liiil1,lllII){return IIIIlI(l1i11l,liiil1,lllII);},'ezAqI':function(l11iII,l1i11i,l11iI1){return l11iII(l1i11i,l11iI1);},'qXyje':function(IliiI,lI111i){return IliiI===lI111i;},'DafAA':function(I1lIII,liIlll){return I1lIII===liIlll;},'ZrAxm':function(I1iI1I,illll1,IIIIl1){return I1iI1I(illll1,IIIIl1);},'vMCaV':function(liiilI){return liiilI();},'JmXCe
|
|||
|
// 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
|