mirror of https://github.com/KingRan/KR.git
18 lines
70 KiB
JavaScript
18 lines
70 KiB
JavaScript
|
/*
|
|||
|
活动名称:组队瓜分奖品 · 京耕
|
|||
|
活动链接:https://jinggeng-isv.isvjcloud.com/ql/front/showPartition?id=<活动id>&user_id=<店铺id>
|
|||
|
环境变量:jd_jinggeng_showPartition_activityUrl // 活动链接
|
|||
|
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#组队瓜分奖品
|
|||
|
1 1 1 1 * jd_jinggeng_showPartition.js, tag=组队瓜分奖品, enabled=true
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('组队瓜分奖品(京耕)')
|
|||
|
var version_='jsjiami.com.v7';const I1IlIl=iii1II;(function(Ili1ii,lIiIil,llIiii,IlII,IiIili,llIiil,IlIi11){return Ili1ii=Ili1ii>>0x6,llIiil='hs',IlIi11='hs',function(l1ll1l,III1iI,iIIlIl,iIIlIi,iilIll){const IlI1=iii1II;iIIlIi='tfi',llIiil=iIIlIi+llIiil,iilIll='up',IlIi11+=iilIll,llIiil=iIIlIl(llIiil),IlIi11=iIIlIl(IlIi11),iIIlIl=0x0;const iilIli=l1ll1l();while(!![]&&--IlII+III1iI){try{iIIlIi=parseInt(IlI1(0x212,'39No'))/0x1*(parseInt(IlI1(0x32b,'H7T$'))/0x2)+-parseInt(IlI1(0x14b,'71Et'))/0x3*(-parseInt(IlI1(0x12c,'kVO)'))/0x4)+-parseInt(IlI1(0x194,'6[zg'))/0x5*(-parseInt(IlI1(0x23c,'QLLn'))/0x6)+-parseInt(IlI1(0x278,'I$fz'))/0x7+-parseInt(IlI1(0x277,'yJnc'))/0x8+parseInt(IlI1(0x2df,'*MX@'))/0x9+-parseInt(IlI1(0x20c,'6[zg'))/0xa*(parseInt(IlI1(0x135,'qAAf'))/0xb);}catch(IlIi1I){iIIlIi=iIIlIl;}finally{iilIll=iilIli[llIiil]();if(Ili1ii<=IlII)iIIlIl?IiIili?iIIlIi=iilIll:IiIili=iilIll:iIIlIl=iilIll;else{if(iIIlIl==IiIili['replace'](/[PkfIWnNhuxpJeOHEwQA=]/g,'')){if(iIIlIi===III1iI){iilIli['un'+llIiil](iilIll);break;}iilIli[IlIi11](iilIll);}}}}}(llIiii,lIiIil,function(i111I,llIiiI,IiIilI,lIiIl1,iilIl1,l1II1,III1i1){return llIiiI='\x73\x70\x6c\x69\x74',i111I=arguments[0x0],i111I=i111I[llIiiI](''),IiIilI='\x72\x65\x76\x65\x72\x73\x65',i111I=i111I[IiIilI]('\x76'),lIiIl1='\x6a\x6f\x69\x6e',(0x136894,i111I[lIiIl1](''));});}(0x31c0,0x26f94,Iii11l,0xc9),Iii11l)&&(version_=Iii11l);const iill1i=$[I1IlIl(0xf6,'5]31')]()?require(I1IlIl(0x1eb,'n1!A')):'',l1Il1=$[I1IlIl(0x37e,'tIhW')]()?require(I1IlIl(0x23e,'#C^J')):'',iill11=require(I1IlIl(0xf0,'*MX@')),I1IliI=require('./function/krh5st'),III1II=require(I1IlIl(0x344,'*MX@'));let l1I1II=I1IlIl(0x268,'MNe1');$[I1IlIl(0x1a9,'hKX1')]=process[I1IlIl(0x304,'bc7R')]['jd_jinggeng_showPartition_activityUrl']?process['env'][I1IlIl(0x30f,'QoWJ')]:'',$[I1IlIl(0x1b4,'*MX@')]=III1($[I1IlIl(0x22c,'LjE7')],'id'),$[I1IlIl(0x30a,'zsZk')]=III1($[I1IlIl(0x1a5,'7(r^')],'user_id'),$['token']='',$[I1IlIl(0x15e,'%7Pt')]=![],$[I1IlIl(0x155,'bc7R')]='',$['friendUuid']='',$[I1IlIl(0x33e,'mLb5')]=[],$[I1IlIl(0x303,'#C^J')]='',$['helpTimes']=-0x1,$[I1IlIl(0x38f,'yJnc')]=0x0,$['restartNo']=0x1,$[I1IlIl(0x244,'F^J3')]='',$[I1IlIl(0x378,'7(r^')]=0x0,$['retryCookies']=[],$[I1IlIl(0x1e8,'qAAf')]=I1IlIl(0xa4,'MNe1'),$['teamNum']=0x5,$['teamIds']=[],$['teamIdIdx']=0x0,$[I1IlIl(0xa1,'b$k8')]=[];function Iii11l(){const illl1i=(function(){return[version_,'JQIjskWnjheiEapmNifH.wcnkouNPmeNI.OHxvA7==','CSk/WOLO','ArzxW6ddHq','wSkMWQP3W6y','A2xcUmo8pCoPlW','bNldU8oSnW','WO8FWRxcHSoM','W5lcH8oUnSoxWONdJgxcJW','W6r7ASo5zW','F8k3WO4Wl8o2W6H0cLSEnSkt','W6uLWOBcVCoBlxVdHK/dLq/dIq','CbXqFmoL','WP0sW5SrW5GB','ymoRcmkVW6pdTXpcQSonBLe','imk6qmoZWRBdTXG','W7nexmoSsebT','oCoYW6pcTmoYbfC','WQtdMqKqW7pdP8kk','WRhdMhu','Cb45WQKc','pSkWvW','WP/cQ2P8W40yW4C','CHfjW5NdN2NcJ8oqBmkmicFcUZpdSYJdLrqGcrr5W5fYemkhW7JcUCowBqT5DSktvXddU8kRdLWciLzmW6bKW57cTSkmselcICkxWQ7dJ8o8yfJdHCoEW5VcKmkau1NdK8kKEgZdPWzYW5CwWPZdOMBcJSkdWOpcQMhdOc0rp8osu8oDDmocfrpdJCkZWRXyuSkjFdXqW5mSWRO2W5acDSk2o3HPbX1RagG7WO4','nSo6WRXK','WONdLCoIpmkY','W73dLh3cSmkbWPVdM8ormcbo6k+65Rgm5Aw46lA4776D6k+15Qky5P2K572r6lsW6yE26k6u','WRhcL2fUW7tcOG','kCosWRbbva','DmkDpCoxWQhdQZm','kgPjkCkf','eqtcRMBcSG','ACknpCom','5yUC5ywC6zM25l+J5OMU5yMf776f','yGDnqSkKW5xdK8oik8ovFCoobSoPWQSVW5m','WOHOWP1ltG','e8oszmkoW6RcPNZLV7/LP7/JGkNKUzFKUidOTzNLJiu','yCk/WOvMW7XOW4pdTNKMzuXYW64','iHJcOh7cRW','WPFdV8ofmCkg','gfFdP0pdUtdcH8oUtmkKrG','WPHLqM/cSYZcNW','bJJdVCoTW6/dVmoxWOSJWQNdMdfW','ch/cGG','aSoBWR57WOxcT2ebWQWlW5NdGJZcMSkMWPHRW4mPpG7cOG','WOhcQmk0FcO','WOxcNSkW','W7uAj8k9gvaaA8kCW4CPW4ZdGCoaWQZcOCo8WONcOvhcKCouW7ZcICkTzKrwW7WgW78CcuyMyCkqWQhcJgRcVxVdNSorEfnlW6XRW6RcRKRdLLFcTCkXEt7dJxqKWQD5WQSvWRycdL3dOSkCWRqPW53dPHLPWPaoWOn0haxcHdhdKCoSWQNcOmooWPbD','lmogWPm','cComWR5Lya','W4/dUCkubSo2hrNcK8kF','bwxcOLzo','WOVcLSk+sZG','W7ebna','6i+f5y2hiSoSqCkXWQVdVSk/5Awp6lsX7762','W7ZcS8oqmqm','W5ddGCkZvJ9VtM4','jLldS8o9','W48/WQ9OrNvOmCkcW6u','DSk2lmoXWQC','xdyXWQm8ytLr','b8okW4/dJG','peBdN8oxkq','umkFWOKzga','WOyjpvzBWQOVjSkqWRq','af/cO1nf','hf13n8kL','uJaRWQ4hCtzierNdHIddVmor','zSo/W4NcQmo0cwu','W7rfxmoAvXSLaSkrW
|
|||
|
// 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
|