mirror of https://github.com/KingRan/KR.git
22 lines
111 KiB
JavaScript
22 lines
111 KiB
JavaScript
|
/*
|
|||
|
活动名称:LZ店铺游戏 · 超级无线
|
|||
|
活动链接:https://lzkj-isv.isvjcloud.com/wxgame/activity/activity?activityId=<活动id>
|
|||
|
环境变量:jd_wxgame_activityId // 活动id
|
|||
|
jd_wxgame_addCart // 是否做加购任务,默认不做
|
|||
|
jd_wxgame_blacklist // 黑名单 用&隔开 pin值
|
|||
|
JD_LZ_OPEN //关闭LZ相关活动运行
|
|||
|
|
|||
|
默认助力第一个号
|
|||
|
cron:1 1 1 1 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
LZ店铺游戏
|
|||
|
1 1 1 1 * jd_wxgame.js, tag=读秒拼手速通用活动, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('无线游戏(超级无线)')
|
|||
|
var version_='jsjiami.com.v7';const l1IIII=iii1II;(function(l1IlI,l1IIIl,IiliI1,Iiii11,l11I,llllli,iiiii1){return l1IlI=l1IlI>>0x1,llllli='hs',iiiii1='hs',function(IIill1,iIII,iI1I1,Ii11iI,IiliII){const I1I1I=iii1II;Ii11iI='tfi',llllli=Ii11iI+llllli,IiliII='up',iiiii1+=IiliII,llllli=iI1I1(llllli),iiiii1=iI1I1(iiiii1),iI1I1=0x0;const Iiii1I=IIill1();while(!![]&&--Iiii11+iIII){try{Ii11iI=parseInt(I1I1I(0x3d3,'hv96'))/0x1*(-parseInt(I1I1I(0x3b8,'G0Qp'))/0x2)+-parseInt(I1I1I(0x39e,'YTq9'))/0x3+-parseInt(I1I1I(0x1f4,'qvDJ'))/0x4+-parseInt(I1I1I(0x2d2,'qvDJ'))/0x5+parseInt(I1I1I(0x1c2,'3D#M'))/0x6*(parseInt(I1I1I(0x1be,'DN5F'))/0x7)+-parseInt(I1I1I(0x2bc,'qvDJ'))/0x8+parseInt(I1I1I(0x156,'VsWX'))/0x9;}catch(II1il1){Ii11iI=iI1I1;}finally{IiliII=Iiii1I[llllli]();if(l1IlI<=Iiii11)iI1I1?l11I?Ii11iI=IiliII:l11I=IiliII:iI1I1=IiliII;else{if(iI1I1==l11I['replace'](/[rdGJlpbWEOygBMthkPH=]/g,'')){if(Ii11iI===iIII){Iiii1I['un'+llllli](IiliII);break;}Iiii1I[iiiii1](IiliII);}}}}}(IiliI1,l1IIIl,function(I11111,l111,il11lI,lIll1I,li1II1,iiIllI,iII1l1){return l111='\x73\x70\x6c\x69\x74',I11111=arguments[0x0],I11111=I11111[l111](''),il11lI='\x72\x65\x76\x65\x72\x73\x65',I11111=I11111[il11lI]('\x76'),lIll1I='\x6a\x6f\x69\x6e',(0x13636e,I11111[lIll1I](''));});}(0x18c,0x27685,Iii11l,0xc8),Iii11l)&&(version_=Iii11l);const IiIiil=$[l1IIII(0x108,'83&Q')]()?require(l1IIII(0x599,'@jIo')):'',IlIi=$[l1IIII(0x2ba,'DN5F')]()?require(l1IIII(0x322,'eALc')):'',IlIl=require('./function/krgetToken'),IiII1=require('./function/krwxSavePrize');let l1IIi=[],l1IIl='',l1I1il='',III1ii={},l1I1ii=!![],III1il=!![],I1IlI1={},i1111='',iIIlII='';if($[l1IIII(0x38b,'eALc')]()){Object['keys'](IiIiil)['forEach'](l1ilI=>{const IIillI=l1IIII;l1IIi[IIillI(0x21b,'tB61')](IiIiil[l1ilI]);});if(process['env'][l1IIII(0x468,'1oiK')]&&process[l1IIII(0x258,'gjG&')][l1IIII(0x46c,'5bBd')]==='false')console[l1IIII(0x44e,'RjYK')]=()=>{};}else{let IIi1=$[l1IIII(0x2f6,'hv96')]('CookiesJD')||'[]';IIi1=JSON['parse'](IIi1),l1IIi=IIi1[l1IIII(0x133,'L7MZ')](illl1i=>illl1i[l1IIII(0x446,'3D#M')]),l1IIi[l1IIII(0x456,'2T8e')](),l1IIi['push'](...[$['getdata'](l1IIII(0x24d,'!u$R')),$[l1IIII(0x540,'LxAc')]('CookieJD')]),l1IIi[l1IIII(0x171,'5bBd')](),l1IIi=l1IIi['filter'](l1iiii=>!!l1iiii);}let IlIi1l=process[l1IIII(0x2e4,'VsWX')][l1IIII(0x236,'JFqY')]?process[l1IIII(0x394,'Xk2B')][l1IIII(0x556,'2T8e')]:'',IiIiiI=process[l1IIII(0x3e5,'LxAc')][l1IIII(0x263,'$okF')]?process[l1IIII(0x4de,'eALc')][l1IIII(0x2f1,'%1jN')]:l1IIII(0x120,'xa2r'),IlIi1i=process[l1IIII(0x2ec,'G0Qp')]['JD_LZ_OPEN']?process[l1IIII(0x2dd,'!d4k')][l1IIII(0x305,'RjYK')]:l1IIII(0x29a,'t$%y'),lIllii='',l1il1='';function Iii11l(){const lliIll=(function(){return[version_,'lWjEsghjkilaWHGmiPr.OpdcOoGGmP.ytv7MJbgB==','W5Wfzu3cMmk1W40','W4hcQXrPW4L4i8kSWPvy','W6Lsr8kIzCocC8ofWRC','sWBdQmoVWOO','nSoHWQP+sG','v8oTpCk8WRG3cX4','W545qe4O','h8oRWR8','W5JdT8o0FSkB','W6tdPWCuEdCXWQG0W6q','pmoaw8oJCa','gLZcGCkKWRa','W43dJSojWPye','oeZcTW','amo0WRrNwa','mmowA3ldNG','WRNdRcddOCkF','WRHdaSkK','dLmZDCkA','WQjdomksW4q','a8oIqeFdHthcNCkuW6tcSmonztlcOI3cMCkhWPy8W7NdOYmsWRlcL8kp','WQa5sq','k8o2W6ddRNW','WR/dJSkj','yKOqW7tcHSkJWPVcS8khW4K8WRmjWO9GBKHa','WRv2p3CI','CSkVW6v6CW','WQFdGcJdPmkA','W7DBxmk2ra','W6JdMCodWOaq','wbNdQCoFWQC','fSo/yeO','WRZcOCkGW4bR','a8oTWRy','nSoCzSoIyq','W6XFrSkXsCoDw8og','WOeZja8dWQq','W57dGmouWO4iW4O','zuCsW7JdLCo1W5tcTmkD','WRtcUSkrW7HzWRpdPgm','W77dVSoPWQek','melcPmoZ','W4WchMq','WO/dPZZdHSko','r8kcuSoVhG','tCoNna','pdDuWPaw','WPldPsxdIq','gCk7xCo/WOycsmkvWPaqBhjhk8kaWO45gmkkWOioWQpcVCko','W44kv3atja','W7xdKCkhWO17','r8kdq8oSnG','WO0ekmklW7vhWRjmW7tdMCoNW6voWRtdP8k8cdxdN0qsW7DsW4mrWR/cT0n+g03dSt1EWR7dKSoLWRRdHcVcOCkbW4XTCWxcLWZdUmkSW5xdRCoEWOvWCI7dOquFW5hdKJjYEmo1W77cQ2VdN2byWO3cMmkclCkUjmk6tmk1WRbWW4/cLYGYa0NcHmkMzWZcOCkru8oheZOs','hvbDW7DosCk1','b0fFW6jpamo/W5DGWQ3cL8ksW4pcINbWCGHJWOdcK8oSW6JdV8kQW5JcJG','W4FdG3xdKSki','W43dJSojWOqmW5W','cKDzW71oD8k1WOT/WRBcM8kD','W7NdGCo+FmkeWONdNxzEWQW','W7W+y3Cw','Cs3dNCoQW4CP','WP0xfMpcI0/cISkHW75nxSkEr8o1tIi2WOfNW6ldPqW','W4tdT0JdRa','W4ybAKlcLmkPW5KuWPBdUKO','WOnti8kLW54','CJldP8o5WRS','W75
|
|||
|
// 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
|