mirror of https://github.com/KingRan/KR.git
20 lines
61 KiB
JavaScript
20 lines
61 KiB
JavaScript
|
/*
|
|||
|
|
|||
|
脚本默认会帮我助力开工位,介意请添加变量HELP_JOYPARK,false为不助力
|
|||
|
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('京东极简版-汪汪乐园助力');
|
|||
|
var version_='jsjiami.com.v7';const Illii=iii1II;(function(IIIl,IIIi,l1IIli,iII1I1,iiiIIi,lIi1iI,l1IIll){return IIIl=IIIl>>0x3,lIi1iI='hs',l1IIll='hs',function(iiiIIl,lIIi11,illiii,IIIll1,illiil){const llIili=iii1II;IIIll1='tfi',lIi1iI=IIIll1+lIi1iI,illiil='up',l1IIll+=illiil,lIi1iI=illiii(lIi1iI),l1IIll=illiii(l1IIll),illiii=0x0;const liI11l=iiiIIl();while(!![]&&--iII1I1+lIIi11){try{IIIll1=parseInt(llIili(0x215,'77A]'))/0x1*(-parseInt(llIili(0x3a1,'pfbf'))/0x2)+-parseInt(llIili(0x393,'k6vn'))/0x3*(-parseInt(llIili(0x2b0,'v8#r'))/0x4)+parseInt(llIili(0x30d,'i8(X'))/0x5*(parseInt(llIili(0x3b3,'mlq!'))/0x6)+parseInt(llIili(0x35f,'H5YB'))/0x7*(parseInt(llIili(0x2f2,'bGF^'))/0x8)+parseInt(llIili(0x2ab,'mk*K'))/0x9+-parseInt(llIili(0x3d1,'T%6u'))/0xa+-parseInt(llIili(0x1e7,'sd67'))/0xb;}catch(l1l1i){IIIll1=illiii;}finally{illiil=liI11l[lIi1iI]();if(IIIl<=iII1I1)illiii?iiiIIi?IIIll1=illiil:iiiIIi=illiil:illiii=illiil;else{if(illiii==iiiIIi['replace'](/[xkVKrtfblwSIPTpHYFU=]/g,'')){if(IIIll1===lIIi11){liI11l['un'+lIi1iI](illiil);break;}liI11l[l1IIll](illiil);}}}}}(l1IIli,IIIi,function(I1I1II,i11ll,Ili11I,i11li,Illil,iil11i,Ill1II){return i11ll='\x73\x70\x6c\x69\x74',I1I1II=arguments[0x0],I1I1II=I1I1II[i11ll](''),Ili11I='\x72\x65\x76\x65\x72\x73\x65',I1I1II=I1I1II[Ili11I]('\x76'),i11li='\x6a\x6f\x69\x6e',(0x13951c,I1I1II[i11li](''));});}(0x5e8,0x6b1f9,Iii11l,0xbf),Iii11l)&&(version_=Iii11l);const Iliii=$[Illii(0x311,'#)dQ')]()?require('./jdCookie.js'):'',illlii=$[Illii(0x2e3,'bP0)')]()?require(Illii(0x2d8,'tPM@')):'',I1lIIi=require(Illii(0x40d,'$2Tx')),l1i1i=require(Illii(0x23b,'osHq'));let I1iI1i=[],l1i1l='',I1iI1l;if($['isNode']()){Object[Illii(0x265,'ULta')](Iliii)[Illii(0x408,'ACaa')](l11iI1=>{const iIlI11=Illii;I1iI1i[iIlI11(0x23d,'sd67')](Iliii[l11iI1]);});if(process[Illii(0x419,'aofF')][Illii(0x1e6,'jYig')]&&process['env'][Illii(0x344,'pfbf')]==='false')console[Illii(0x23c,'AVj7')]=()=>{};}else I1iI1i=[$[Illii(0x2fa,'i8(X')](Illii(0x387,'T%6u')),$[Illii(0x2cd,'jiuk')]('CookieJD2'),...l1i11i($['getdata'](Illii(0x314,'QOTI'))||'[]')[Illii(0x262,'T%6u')](IliiI=>IliiI['cookie'])][Illii(0x1cf,'P66K')](lI111i=>!!lI111i);function Iii11l(){const iliIl=(function(){return[version_,'IfxjVTsYjiHIkaHmSViwFP.KctwToUml.vIr7btp==','W4CtqbJdMYhdLsP1W5e','pHRcJW','ELSfWOFcGvCRWQy','DCkNfSkItW','W4BdLCoAWOGiAcxcIW','wYOyWQq0yYVdT8oSm8oKEq','WO0yW7pdP0qpdepcVa','6k2P5yMm6zMy5OEU5z6zqftdN14v6lYt5ys+5Qgl5l+D5PA25ysV5A6aWRZLUjVOR7tPGzlOVlVOHOFMNRtLJPpOJPRLJ6r4WRNdOmkbWPRdMq','FSkgW7VdSZ0','AcaEfti','WQKrW7ZdPum','xEwjKowjPSkn','nSkhmSki6k+q5Rku5AEh6lwG77+E6k2j5QcD5P+Z57Yw6lEv6ywl6kYn','hSkksq','fWldQHZcJhFcRmkdd8kxh8kfWP3cTW','vCojWOBcJ0aBwL8CW6afxryIWRvTsCowWOVcO2Sbt8k9W45zgqZdNctdHmocgWSEWQGAWRbKuCkvW58X','mdjmWOKneW1gpsa4W6FcUs4DW4JdTtWrW5pcIqyUlCoXiWdcGtJdV8kLdXX3WOqZW4SUrN9OW7NcIJjYW7NcOWZcSCkbW6ldR8kYW7SmW5xcVrRcQmk/WOT6WPldRxDYCSolW6FcRcq2WRfvtW','W5ldL8k8WQ/dGW','WRtdISkJD8krbmkyfHq8W609WPe6dwrSuelcRblcM8kPWQfZyCkiWPXZW43dQL3dS8kEjd/dQSkHuLVdLSkYyW','WO3cGSoEWP4YAq','WPWbWPddP8ox','EvKxuCkuWRyUW6ZdIG','fmorW64UW4ei','t8kdlmkmtG','WPqmWQVdGW','WPeCW6ZdVfmEgvBcSmobW5vDnaG','W7KMW47cVeJdR8kPWRm','ErpdJSoxlW','tSkyW5/dHGS','EKiwta','W4pdS3T2W7WGxCo1vgxdO8k/sq','xrfbWRyKk8kdAL3dTLhcNoIUKUAWMowKN+I1TU++LoISNUAGH+ADSUE+V+I0IUMeUEISQW','WPj6W78XWQ4','rg8zWPm+oCkCW7FdHW','WQu1W4jwBq','WO8La2xcISodzW','aqZdVq4','z0yuWOxcOveVWQxdPG','lsabW5bctq','W6OcohpcP8kKrgtdJCkwW53dPSoAWPr8W6RcMmkau8oZWPyMyCkeWQyVcCkggWrsCSkaW7ZdG2BcP8osAmk2WR4BWOG','vgKFWQ4oFbRdO8oqp8k1n38','W4lcL8o6mmk6','W6FdQvNdPCkR','5lIb5yUm5AE36lAd776H','bCkbWQruzmkthmoAxf/dVSkOjJPVW6pdRmkJy8kzWQXv','xCkjW4PTbSkbkd3cSmkfW75fhG','bJzc','dmkxWRnaCSopa8oebapcS8oTCx88W7q','sd7cQL8','xcRdMCo0iSowW53dHWbjWPOjCSoT','W73cSwVdGCkhWPRdKt1tWROAWOz+','W7vMcCoB','W7hcLCoGiSkO','lmo0W4i','Cmk0emkNyW','CgmZhSoEkmkSW5LhDY3cUuVdUSooxdtcPv7dKConkG','WQxdRJ8','WQHuW7K','iqhcMSkNWQBdUCklzMW','EKWxs8kF','CSoMWR8','W47cNmoYkmk1WQ5TWOG','W4yNlCoC','W4yuh8o4nW','W5FcNINdGCkOW5Kf','xfFdV8kw','uXhdQJq','Cf0iWOK','W73dLvldPSkHWRi','WRFdScfaW7i','W69Mf8ovWRXHDGWrsmkxvuxdLG','WRnAW7CU','s8kvW59yW7e','WOVdItrhW64'
|
|||
|
// 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
|