KR/jd_wxTeam.js

25 lines
119 KiB
JavaScript
Raw Normal View History

2023-08-01 16:47:55 +08:00
/*
活动名称组队瓜分奖品 · 超级无线/超级会员
2023-09-28 08:29:17 +08:00
活动链接https://lzkj-isv.isvjd.com/wxTeam/activity2/activity?activityId=<活动id>
https://cjhy-isv.isvjcloud.com/wxTeam/activity?activityId=<活动id>
2023-08-01 16:47:55 +08:00
环境变量jd_wxTeam_activityUrl // 活动链接(必填)
2023-10-28 08:28:03 +08:00
jd_wxTeam_joinMember // 是否入会true/false默认入会
2023-08-01 16:47:55 +08:00
jd_wxTeam_Notify // 是否推送通知true/false默认不推送
2023-08-05 19:19:49 +08:00
jd_wxTeam_Concurrent // 是否启用并发模式true/false默认不开启
2023-10-31 18:04:33 +08:00
jd_wxTeam_maxConcurrency // 控制并发线程数正整数默认3
2023-09-28 08:29:17 +08:00
jd_wxTeam_blacklist 黑名单 &隔开 pin值
JD_LZ_OPEN // 是否开启LZ活动运行默认运行
JD_CJ_OPEN // 是否开启CJ活动运行默认运行
jd_wxTeam_break // 493后继续执行默认退出运行true/false
2023-08-01 16:47:55 +08:00
2023-10-22 13:28:19 +08:00
队长无效或无法创建战队时会退出执行并发模式下也支持入会
2023-08-01 16:47:55 +08:00
2023-10-28 08:28:03 +08:00
cron: 7 7 7 7 * jd_wxTeam.js
2023-08-01 16:47:55 +08:00
*/
const $ = new Env('组队瓜分奖品(超级无线/超级会员)')
2023-10-31 22:15:35 +08:00
var version_='jsjiami.com.v7';const IiIl1l=iii1II;function iii1II(_0x904b47,_0x21f413){const _0x7e1560=Iii11l();return iii1II=function(_0x42ac78,_0x956fd5){_0x42ac78=_0x42ac78-0x157;let _0x452f33=_0x7e1560[_0x42ac78];if(iii1II['WJTDDO']===undefined){var _0x1c4fc3=function(_0x2a96cd){const _0x6fd756='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x413239='',_0x3d61b8='';for(let _0x1685aa=0x0,_0x44e63f,_0x47ab63,_0x1abca7=0x0;_0x47ab63=_0x2a96cd['charAt'](_0x1abca7++);~_0x47ab63&&(_0x44e63f=_0x1685aa%0x4?_0x44e63f*0x40+_0x47ab63:_0x47ab63,_0x1685aa++%0x4)?_0x413239+=String['fromCharCode'](0xff&_0x44e63f>>(-0x2*_0x1685aa&0x6)):0x0){_0x47ab63=_0x6fd756['indexOf'](_0x47ab63);}for(let _0x120a58=0x0,_0x4b970d=_0x413239['length'];_0x120a58<_0x4b970d;_0x120a58++){_0x3d61b8+='%'+('00'+_0x413239['charCodeAt'](_0x120a58)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3d61b8);};const _0x391325=function(_0x44100b,_0x3a7402){let _0x136c95=[],_0x5256ab=0x0,_0x5a2dad,_0x1c1309='';_0x44100b=_0x1c4fc3(_0x44100b);let _0x59aa7e;for(_0x59aa7e=0x0;_0x59aa7e<0x100;_0x59aa7e++){_0x136c95[_0x59aa7e]=_0x59aa7e;}for(_0x59aa7e=0x0;_0x59aa7e<0x100;_0x59aa7e++){_0x5256ab=(_0x5256ab+_0x136c95[_0x59aa7e]+_0x3a7402['charCodeAt'](_0x59aa7e%_0x3a7402['length']))%0x100,_0x5a2dad=_0x136c95[_0x59aa7e],_0x136c95[_0x59aa7e]=_0x136c95[_0x5256ab],_0x136c95[_0x5256ab]=_0x5a2dad;}_0x59aa7e=0x0,_0x5256ab=0x0;for(let _0x534f55=0x0;_0x534f55<_0x44100b['length'];_0x534f55++){_0x59aa7e=(_0x59aa7e+0x1)%0x100,_0x5256ab=(_0x5256ab+_0x136c95[_0x59aa7e])%0x100,_0x5a2dad=_0x136c95[_0x59aa7e],_0x136c95[_0x59aa7e]=_0x136c95[_0x5256ab],_0x136c95[_0x5256ab]=_0x5a2dad,_0x1c1309+=String['fromCharCode'](_0x44100b['charCodeAt'](_0x534f55)^_0x136c95[(_0x136c95[_0x59aa7e]+_0x136c95[_0x5256ab])%0x100]);}return _0x1c1309;};iii1II['pwrHoM']=_0x391325,_0x904b47=arguments,iii1II['WJTDDO']=!![];}const _0x563540=_0x7e1560[0x0],_0x3737c0=_0x42ac78+_0x563540,_0x3331aa=_0x904b47[_0x3737c0];return!_0x3331aa?(iii1II['ienWkT']===undefined&&(iii1II['ienWkT']=!![]),_0x452f33=iii1II['pwrHoM'](_0x452f33,_0x956fd5),_0x904b47[_0x3737c0]=_0x452f33):_0x452f33=_0x3331aa,_0x452f33;},iii1II(_0x904b47,_0x21f413);}function Iii11l(){const I11lII=(function(){return[...[version_,'BntjTpsWjiaPkGmSWSit.TVcolUmCI.QvQSk7Mhx==','zqCbrmoE','pSo6W5CtBq','iCozWQS','bvvAW6JcNSouWQldRSoD','WPLgWRTnemonW4JdSSoLvmoz','WR/cHuBdPqm+fa','cSosBCooWR8','W51og0NcVvuNa3u','cmkmySoMaW','WR3cMhjbodn3nCkGDMBdSsm5WPz3W5G','kWhdV1FcNa','AxVdTG','W5VcNvVcKJS','bSonW6a','hmoNqWxcRa','e8oZW5FdTaC','asVdPs3dUCkW','dItdKMVcSa','W4HoafZcQKW7agm8W53dOG','Dh3dOSok','W6VdRSkKW644','dSogW6xcNCkBmZe','AZOGWPNcVq','DfbiW7eDWOiLW5dcKCo3lGjDWOvK','pmosW6KVwquggSoxW40','W6ldUmkhW6SOlflcP8kSCK3dPa','cv53W7lcH8o0WPFdPSoErmo0W4xcOmkvwq','WPimW6rLzq','mCo6W7NdNG','WRyPW5bova','FCkeWQJdLCku','WQpdV8k3t8ow','WQVcI1VdNd8Ne1WEzLXgdSkhW47dPq','wvdcUmopka','WOtdNK7cUhrJgJKhs1FdJ8oc','W4nlWQDfcCoHW4NcSSoVxSoFWQVcMt7dJmoYWOapss/cOL4A','BWWr','mCoju8o3W7xcUSoCfSkUW5tcMMDQtCosWOClmCoKWQtdLZxcI1RcS8kIe8oMFZy0W6ldQ1lcKdFdR09LWP1UFh8bW75PWRFcLJbIW5yWxvG1o8k3WOG5qmkkW41JbSkyW7ddTqyzWPldSCogphxdHJBdImo3W6j8WOhdRetcSrZdTWDIWQavkh0RE8oJF3z5F8o8y1tcR8oFh8kiWRJcJSkjWRNcJmomCmocn0KYdcC2agyrCmoYWQrkCZaYm8o8W7RdLuhcUmk+l1PvWQvwWQxcKh/dJbb4aCoFWRRdNZaHWRn0jmkGWRVdIMquWPZcOftcGSksc8knWRddStW1W7hdGSooc8kcWOFcPx7dPWpcPSoFW50pWObsW6NdOmocjh3cMcCkW4WqW70','p8oqW64JEH4E','dLWDfMq','AK7dKmkCWPPbiSkdWPVdVSkGBq','WPBdI17cMM9PmJ8mAvpdJCodWR0','weVcP8og','A8k2WO7dImk5','CLJdISk4WOvmh8kxWQ7dOmk1xCk5DG','aUodSUA1MowkQEwCLUwEUEodSq','FoIUNUAZNUwKV+I3R++/Lmk+W7qmWQ7cUYNdULbwCmkyWQOoW6C','imoLW7/dOJG4','gtJdPt4','5P2+6ig16i6x5y635yUD5REY5yIl5l+F5Ooc','W63dMrldP8or','rcavWRNcKmopWOLCbcjjEG','6i+J5y2EabhcHmkNW7DrW4BdRc3dT+wLHoI0V++8JW','CSk1W6VdG8oQht0W','WPCzW5j/DW','zmkVW7tcISkE','WR7cSmkTfc/cVqtcPxVcSHu','W47cGSoJW6aD','CCkjW6JcLmkn','4PQQW67ORO3LOR3LHzhMORRLVRFMRQBNOjRNM6JPKANMJjS','bmogW6lcOCkkmtPWfSoEW4PEymkxta','W5dcTSopW70U','A8kTdSk/WR7dR8omWRW9cmkQ','wJGrcK0','mxrsW4BcMG','zwVdPColCeqyWOddL8oiW7xdSa','WRRdOSkeW4T1aCodWOddVIddUmktWOX1W5GVW4TNFm
2023-08-01 16:47:55 +08:00
// prettier-ignore
2023-09-28 08:29:17 +08:00
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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"])