KR/jd_wxTeam.js

26 lines
92 KiB
JavaScript
Raw Normal View History

2023-08-01 16:47:55 +08:00
/*
活动名称组队瓜分奖品 · 超级无线/超级会员
活动链接https://lzkj-isv.isvjd.com/wxTeam/activity/activity?activityId=<活动id>
https://cjhydz-isv.isvjcloud.com/wxTeam/activity?activityId=<活动id>
环境变量jd_wxTeam_activityUrl // 活动链接(必填)
jd_wxTeam_joinMember // 是否入会true/false默认不入会
jd_wxTeam_Notify // 是否推送通知true/false默认不推送
2023-08-05 19:19:49 +08:00
jd_wxTeam_Concurrent // 是否启用并发模式true/false默认不开启
jd_wxTeam_maxConcurrency // 控制最大并发线程数默认3
2023-08-01 16:47:55 +08:00
队长无效或无法创建战队时会退出执行
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#组队瓜分奖品
1 1 1 1 * jd_wxTeam.js, tag=组队瓜分奖品, enabled=true
*/
const $ = new Env('组队瓜分奖品(超级无线/超级会员)')
2023-08-08 21:09:09 +08:00
var version_='jsjiami.com.v7';const ll1111=iii1II;(function(II1i1l,II1i1i,Il1iiI,iIil1,l1IllI,lIi1Ii,iiilII){return II1i1l=II1i1l>>0x2,lIi1Ii='hs',iiilII='hs',function(IIiIII,lili,lIi1Il,Ii1lII,iliI11){const ii1iII=iii1II;Ii1lII='tfi',lIi1Ii=Ii1lII+lIi1Ii,iliI11='up',iiilII+=iliI11,lIi1Ii=lIi1Il(lIi1Ii),iiilII=lIi1Il(iiilII),lIi1Il=0x0;const ii1iI1=IIiIII();while(!![]&&--iIil1+lili){try{Ii1lII=parseInt(ii1iII(0x3d6,'E!1H'))/0x1*(-parseInt(ii1iII(0x493,'5*U3'))/0x2)+parseInt(ii1iII(0x4c2,'8l&R'))/0x3+parseInt(ii1iII(0x26c,'jjY8'))/0x4*(parseInt(ii1iII(0x57f,'LZRa'))/0x5)+-parseInt(ii1iII(0x536,'Pg3%'))/0x6*(-parseInt(ii1iII(0x570,'HL]Y'))/0x7)+-parseInt(ii1iII(0x4da,'W]]D'))/0x8+-parseInt(ii1iII(0x495,'Zy%!'))/0x9*(-parseInt(ii1iII(0x60a,'1q(V'))/0xa)+-parseInt(ii1iII(0x1c1,'US&^'))/0xb;}catch(ll111I){Ii1lII=lIi1Il;}finally{iliI11=ii1iI1[lIi1Ii]();if(II1i1l<=iIil1)lIi1Il?l1IllI?Ii1lII=iliI11:l1IllI=iliI11:lIi1Il=iliI11;else{if(lIi1Il==l1IllI['replace'](/[SdnrkgABHEFUGXlNIYy=]/g,'')){if(Ii1lII===lili){ii1iI1['un'+lIi1Ii](iliI11);break;}ii1iI1[iiilII](iliI11);}}}}}(Il1iiI,II1i1i,function(liIl1I,IIl111,lill,Ill1lI,Ii1lI1,IliliI,iliI1I){return IIl111='\x73\x70\x6c\x69\x74',liIl1I=arguments[0x0],liIl1I=liIl1I[IIl111](''),lill='\x72\x65\x76\x65\x72\x73\x65',liIl1I=liIl1I[lill]('\x76'),Ill1lI='\x6a\x6f\x69\x6e',(0x138594,liIl1I[Ill1lI](''));});}(0x318,0x8f782,Iii11l,0xc8),Iii11l)&&(version_=Iii11l);const iliiIl=require(ll1111(0x418,'HL]Y')),IliIii=require('./function/jdCommon'),liIIl1=require('./function/sendJDNotify'),iIliiI=require(ll1111(0x237,'Ic)g')),IIiilI=require(ll1111(0x4a7,'rXxg')),I1lii1=process[ll1111(0x5be,'Ib3i')][ll1111(0x5b3,'uzDW')]||'',ilIIlI=process[ll1111(0x48d,'ZUqV')][ll1111(0x5dc,'1&u)')]===ll1111(0x272,'qpVU'),liiiI1=process[ll1111(0x2ff,'io@b')]['jd_wxTeam_Notify']===ll1111(0x279,'ZUqV'),iIl11=process[ll1111(0x602,'bCL3')][ll1111(0x3ec,'W]]D')]==='true',ii1I=process[ll1111(0x1f7,'l)ry')][ll1111(0x482,'Ic)g')]||'3';let i11Ili='',liII='',l1IlI1='';const ii11=Object[ll1111(0x408,'byoy')](iliiIl)[ll1111(0x5a8,'xmK[')](i11IlI=>iliiIl[i11IlI])[ll1111(0x26a,'HL]Y')](Ii1I1=>Ii1I1);!ii11[0x0]&&($['msg']($[ll1111(0x603,'Vu06')],ll1111(0x222,'HL]Y')),process[ll1111(0x4c1,'&bOC')](0x1));function iii1II(_0x35786f,_0x4508d8){const _0x4bb69c=Iii11l();return iii1II=function(_0x522c38,_0x44d156){_0x522c38=_0x522c38-0x1b6;let _0x5c4e5b=_0x4bb69c[_0x522c38];if(iii1II['KLRfhX']===undefined){var _0x1da533=function(_0x213416){const _0xa712b4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x530c3a='',_0x5c6f8c='';for(let _0x9e4ade=0x0,_0x280829,_0xc01514,_0x312816=0x0;_0xc01514=_0x213416['charAt'](_0x312816++);~_0xc01514&&(_0x280829=_0x9e4ade%0x4?_0x280829*0x40+_0xc01514:_0xc01514,_0x9e4ade++%0x4)?_0x530c3a+=String['fromCharCode'](0xff&_0x280829>>(-0x2*_0x9e4ade&0x6)):0x0){_0xc01514=_0xa712b4['indexOf'](_0xc01514);}for(let _0x40fa9e=0x0,_0x235035=_0x530c3a['length'];_0x40fa9e<_0x235035;_0x40fa9e++){_0x5c6f8c+='%'+('00'+_0x530c3a['charCodeAt'](_0x40fa9e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5c6f8c);};const _0x2139d5=function(_0x335584,_0x42fd70){let _0x414561=[],_0x214a5d=0x0,_0x199e06,_0x59e65e='';_0x335584=_0x1da533(_0x335584);let _0x1a7fb6;for(_0x1a7fb6=0x0;_0x1a7fb6<0x100;_0x1a7fb6++){_0x414561[_0x1a7fb6]=_0x1a7fb6;}for(_0x1a7fb6=0x0;_0x1a7fb6<0x100;_0x1a7fb6++){_0x214a5d=(_0x214a5d+_0x414561[_0x1a7fb6]+_0x42fd70['charCodeAt'](_0x1a7fb6%_0x42fd70['length']))%0x100,_0x199e06=_0x414561[_0x1a7fb6],_0x414561[_0x1a7fb6]=_0x414561[_0x214a5d],_0x414561[_0x214a5d]=_0x199e06;}_0x1a7fb6=0x0,_0x214a5d=0x0;for(let _0x5807bd=0x0;_0x5807bd<_0x335584['length'];_0x5807bd++){_0x1a7fb6=(_0x1a7fb6+0x1)%0x100,_0x214a5d=(_0x214a5d+_0x414561[_0x1a7fb6])%0x100,_0x199e06=_0x414561[_0x1a7fb6],_0x414561[_0x1a7fb6]=_0x414561[_0x214a5d],_0x414561[_0x214a5d]=_0x199e06,_0x59e65e+=String['fromCharCode'](_0x335584['charCodeAt'](_0x5807bd)^_0x414561[(_0x414561[_0x1a7fb6]+_0x414561[_0x214a5d])%0x100]);}return _0x59e65e;};iii1II['jmpxRF']=_0x2139d5,_0x35786f=arguments,iii1II['KLRfhX']=!![];}const _0x575dc
2023-08-01 16:47:55 +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