KR/jd_jj_wwly_help.js

20 lines
66 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-08-26 14:12:35 +08:00
var version_='jsjiami.com.v7';const ilIIlI=iii1II;(function(I1liiI,l1I11l,iIliii,l1I11i,iIlii1,IIiil1,l1IlII){return I1liiI=I1liiI>>0x8,IIiil1='hs',l1IlII='hs',function(ii1i,ilIIl1,ii1l,iIl1I,liIi){const I1lii1=iii1II;iIl1I='tfi',IIiil1=iIl1I+IIiil1,liIi='up',l1IlII+=liIi,IIiil1=ii1l(IIiil1),l1IlII=ii1l(l1IlII),ii1l=0x0;const liIIlI=ii1i();while(!![]&&--l1I11i+ilIIl1){try{iIl1I=-parseInt(I1lii1(0x3f3,'@)JC'))/0x1*(parseInt(I1lii1(0x3f9,'geji'))/0x2)+-parseInt(I1lii1(0x2fc,'8voK'))/0x3+-parseInt(I1lii1(0x2c7,'dMEI'))/0x4*(-parseInt(I1lii1(0x395,'VxGx'))/0x5)+parseInt(I1lii1(0x280,'KMWN'))/0x6+-parseInt(I1lii1(0x3a9,'mfly'))/0x7*(-parseInt(I1lii1(0x379,'#qL#'))/0x8)+-parseInt(I1lii1(0x168,'J]w0'))/0x9*(-parseInt(I1lii1(0x1c7,'dMEI'))/0xa)+parseInt(I1lii1(0x2de,'DcGr'))/0xb;}catch(IliIil){iIl1I=ii1l;}finally{liIi=liIIlI[IIiil1]();if(I1liiI<=l1I11i)ii1l?iIlii1?iIl1I=liIi:iIlii1=liIi:ii1l=liIi;else{if(ii1l==iIlii1['replace'](/[xwuWTtNnJpPkLMEfQYFU=]/g,'')){if(iIl1I===ilIIl1){liIIlI['un'+IIiil1](liIi);break;}liIIlI[l1IlII](liIi);}}}}}(iIliii,l1I11l,function(iliiIi,i11Ill,iliiIl,IliIii,liIIl1,iIliiI,IIiilI){return i11Ill='\x73\x70\x6c\x69\x74',iliiIi=arguments[0x0],iliiIi=iliiIi[i11Ill](''),iliiIl='\x72\x65\x76\x65\x72\x73\x65',iliiIi=iliiIi[iliiIl]('\x76'),IliIii='\x6a\x6f\x69\x6e',(0x13b199,iliiIi[IliIii](''));});}(0xca00,0x9c458,Iii11l,0xcc),Iii11l)&&(version_=Iii11l);function iii1II(_0x3030cf,_0x1bc9dd){const _0x23dee9=Iii11l();return iii1II=function(_0x2c54c9,_0x142b30){_0x2c54c9=_0x2c54c9-0x159;let _0x35c761=_0x23dee9[_0x2c54c9];if(iii1II['imgDVg']===undefined){var _0x582d9f=function(_0x4ab622){const _0x1d932a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5297d8='',_0x3869e6='';for(let _0x25bc4f=0x0,_0x3954dd,_0x56fb99,_0x5c5613=0x0;_0x56fb99=_0x4ab622['charAt'](_0x5c5613++);~_0x56fb99&&(_0x3954dd=_0x25bc4f%0x4?_0x3954dd*0x40+_0x56fb99:_0x56fb99,_0x25bc4f++%0x4)?_0x5297d8+=String['fromCharCode'](0xff&_0x3954dd>>(-0x2*_0x25bc4f&0x6)):0x0){_0x56fb99=_0x1d932a['indexOf'](_0x56fb99);}for(let _0x294021=0x0,_0x524d12=_0x5297d8['length'];_0x294021<_0x524d12;_0x294021++){_0x3869e6+='%'+('00'+_0x5297d8['charCodeAt'](_0x294021)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3869e6);};const _0x4d8a73=function(_0x52d492,_0x1b6f02){let _0x55e9e2=[],_0x2c71de=0x0,_0x316c60,_0x3b7f7a='';_0x52d492=_0x582d9f(_0x52d492);let _0x1aca64;for(_0x1aca64=0x0;_0x1aca64<0x100;_0x1aca64++){_0x55e9e2[_0x1aca64]=_0x1aca64;}for(_0x1aca64=0x0;_0x1aca64<0x100;_0x1aca64++){_0x2c71de=(_0x2c71de+_0x55e9e2[_0x1aca64]+_0x1b6f02['charCodeAt'](_0x1aca64%_0x1b6f02['length']))%0x100,_0x316c60=_0x55e9e2[_0x1aca64],_0x55e9e2[_0x1aca64]=_0x55e9e2[_0x2c71de],_0x55e9e2[_0x2c71de]=_0x316c60;}_0x1aca64=0x0,_0x2c71de=0x0;for(let _0x55a2e0=0x0;_0x55a2e0<_0x52d492['length'];_0x55a2e0++){_0x1aca64=(_0x1aca64+0x1)%0x100,_0x2c71de=(_0x2c71de+_0x55e9e2[_0x1aca64])%0x100,_0x316c60=_0x55e9e2[_0x1aca64],_0x55e9e2[_0x1aca64]=_0x55e9e2[_0x2c71de],_0x55e9e2[_0x2c71de]=_0x316c60,_0x3b7f7a+=String['fromCharCode'](_0x52d492['charCodeAt'](_0x55a2e0)^_0x55e9e2[(_0x55e9e2[_0x1aca64]+_0x55e9e2[_0x2c71de])%0x100]);}return _0x3b7f7a;};iii1II['RDyBeP']=_0x4d8a73,_0x3030cf=arguments,iii1II['imgDVg']=!![];}const _0x3f7802=_0x23dee9[0x0],_0x186db9=_0x2c54c9+_0x3f7802,_0x72156b=_0x3030cf[_0x186db9];return!_0x72156b?(iii1II['DuetvG']===undefined&&(iii1II['DuetvG']=!![]),_0x35c761=iii1II['RDyBeP'](_0x35c761,_0x142b30),_0x3030cf[_0x186db9]=_0x35c761):_0x35c761=_0x72156b,_0x35c761;},iii1II(_0x3030cf,_0x1bc9dd);}const I1ll1I=$[ilIIlI(0x195,'&Lrv')]()?require('./jdCookie.js'):'',Iii1I1=$[ilIIlI(0x2ae,'$fqh')]()?require(ilIIlI(0x23e,'$gTP')):'',i11iI1=require(ilIIlI(0x175,'EzrD')),Iii1II=require(ilIIlI(0x3be,'&Lrv')),llIlI=require(ilIIlI(0x293,'RJ*7'));let l1iIil=[],l1iIii='',illllI;if($[ilIIlI(0x1cb,'*50f')]()){Object[ilIIlI(0x235,'dHp*')](I1ll1I)[ilIIlI(0x39f,'ZaMm')](illlli=>{const liiiI1=ilIIlI;l1iIil[liiiI1(0x321,'NQ8t')](I1ll1I[illlli]);});if(process[ilIIlI(0x2e0,'m#d)')][ilIIlI(0x3e7,'0st&')]&&process[ilIIlI(0x2d9,'IHaa')]['JD_DEBUG']===ilIIlI(0x339,
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