faker3/jd_wxTeam.js

23 lines
66 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称组队瓜分奖品 · 超级无线/超级会员
活动链接https://lzkj-isv.isvjd.com/wxTeam/activity2/activity?activityId=<活动id>
https://cjhy-isv.isvjcloud.com/wxTeam/activity?activityId=<活动id>
2024-07-07 13:57:51 +08:00
环境变量jd_wxTeam_url // 活动链接(必填)
2024-06-28 15:38:28 +08:00
jd_wxTeam_Notify // 是否推送通知true/false默认不推送
jd_wxTeam_joinMember // 是否入会true/false默认入会
jd_wxTeam_conc // 是否启用并发模式true/false默认不开启
jd_wxTeam_concThreads // 控制并发线程数正整数默认3
jd_wxTeam_concRetry // 并发模式下接口请求的最大重试次数正整数默认0即不重试
jd_wxTeam_concTimeout // 并发模式下接口请求的最大超时时间(正整数,单位毫秒),默认 '60000' 即1分钟
队长无效或无法创建战队时会退出执行并发模式下也支持入会
2024-07-07 13:57:51 +08:00
cron:1 1 1 1 *
2024-06-28 15:38:28 +08:00
*/
const $ = new Env('组队瓜分奖品(超级无线/超级会员)')
2024-07-08 11:15:08 +08:00
const _0x15e48e=_0x27fa;(function(_0x4bccfc,_0x1f6476){const _0x1730e8=_0x27fa,_0x3e654e=_0x4bccfc();while(!![]){try{const _0x14955c=parseInt(_0x1730e8(0x252,'Q8q^'))/0x1*(parseInt(_0x1730e8(0x2d8,'jY!F'))/0x2)+parseInt(_0x1730e8(0x15f,'MA[l'))/0x3+-parseInt(_0x1730e8(0xb9,'#8r!'))/0x4*(parseInt(_0x1730e8(0x163,'#8r!'))/0x5)+-parseInt(_0x1730e8(0x373,'LdLs'))/0x6+parseInt(_0x1730e8(0x124,'0sl^'))/0x7*(-parseInt(_0x1730e8(0x12c,'jY!F'))/0x8)+parseInt(_0x1730e8(0x2ce,'uEE6'))/0x9*(parseInt(_0x1730e8(0x36b,'oOUp'))/0xa)+parseInt(_0x1730e8(0x2e4,'nGiy'))/0xb;if(_0x14955c===_0x1f6476)break;else _0x3e654e['push'](_0x3e654e['shift']());}catch(_0x2b4406){_0x3e654e['push'](_0x3e654e['shift']());}}}(_0x2299,0x8b136));const jdCookie=require('./jdCookie'),common=require('./utils/Rebels_jdCommon'),notify=require(_0x15e48e(0x35f,'VeAU')),getToken=require('./utils/Rebels_Token'),{wuxianDefense}=require(_0x15e48e(0x20a,'o9^y'));console['log'](''),console['log'](_0x15e48e(0xc1,'tGSN')+$[_0x15e48e(0x345,'wX%o')]+_0x15e48e(0x33b,'6%2q')),console['log'](_0x15e48e(0x216,'hcJh')),console['log'](_0x15e48e(0x250,'hcJh')),console[_0x15e48e(0xcf,'YqCk')](_0x15e48e(0x1da,'uEE6')),console[_0x15e48e(0x35d,'zSjb')](_0x15e48e(0x29c,'p#Eh')),console['log']('jd_wxTeam_concThreads\x20//\x20控制并发线程数正整数默认3'),console[_0x15e48e(0x115,'aKps')](_0x15e48e(0x2a4,'YqCk')),console['log'](_0x15e48e(0x330,'8m79')),console['log'](_0x15e48e(0x2b7,'Eo3G')+$[_0x15e48e(0x120,'nGiy')]+'提示结束=========='),console[_0x15e48e(0x142,'p*Uw')]('');const activityUrl=process[_0x15e48e(0x122,'y2]7')][_0x15e48e(0x188,'8m79')]||process['env'][_0x15e48e(0xdc,'8h!f')]||'',joinMember=!(process['env'][_0x15e48e(0x319,'#8r!')]===_0x15e48e(0x287,'q!bf')),isNotify=process[_0x15e48e(0x168,'o9^y')]['jd_wxTeam_Notify']===_0x15e48e(0x206,'[^(0'),concMode=(process['env'][_0x15e48e(0xd3,'sbq%')]||process[_0x15e48e(0x2ae,'[^(0')][_0x15e48e(0xe4,'zSjb')])==='true',concThreads=process['env'][_0x15e48e(0xc2,'JySY')]||process[_0x15e48e(0x24e,'sbq%')][_0x15e48e(0x125,'p#Eh')]||'3';function _0x2299(){const _0x5f1bf3=['5Bw557Qc5PUw6zQb6zsQ5lIs77+T6zMu5l+LW5SF77Ys','WRCCWRrXqhHYW7xdQNOf','v3y2xcmSW4JcNJm','lb5zWR7dHeJdT8oXc8oZm8kFWPbKWRlcMXtdLrjMW6WDASomghNdQSoZnSocyLmbtd/cRSkSW6fMW6uKWPeRm1ayW6hdQcLEWRNdPaRcSmk6D8kZkbFcKJvdWR/dPrr+FIpcT2VdMaLOh1bGWPKSWRX5xKe8W7T0W5jKWO3dQxDfamo6j8ksmmkJWPtdNCoZBNLTwCkdaXmetWmuWOT5WP7dVmkdh8oeW6GLlCoPW4CCpvNcVCk8CJbNbbtdJmkV','yxjEWOBcISo1WOC','WPWsW4a','rSoIcCkQ','AN1oWO/cQSoJWO7dGa','WPFcICkRqbZcJfG','5yI25ysf5BU96zcd5l2a5zk55OUp5yUJ','W68bzX7dSmoXeSk4WR98WQ4KWQi','W6NdS8omqGpdLmkBcqu','W48yWRRcOHVdHCkopZuQeqjGWOe','vmopWQxcHd11l8kO','W73dLmo3gw7dMZD5z8oMW49gEG','nG9SW7/dUYG','C8oCD3xdTSkgW4i2s3G','b8keWQ0','WRJcLCkJxIVcNq','bUw6PUwmQUI8PEIJOEwVJoATSW','rdFcHCouW6RcOaOV','WRSAWRnRv3zJ','W7ZdS8otsG','AwddLG','5yMi5ywY5BMg6zkO5l+65zkl5OMW5yMF','lrvsWQ/cN2pdRmoZdmk2nW','W5rTW5pcP8kAFa','p3iWzwb5WQ0','W4XMW409W6OVwq','ttVcGSojW7lcQbmZrX8','W5VdJSozBSosaW','fG3dQmorWOWLAa','WRpcMCk6uIBcLN1kumooW5jYv8ohWQeoErOQW58KcmkAW4JdMLaoENf3mIldKIXuWO/cSwpcGHq','WRKxeSk6nCkmWRitWOZcVtJdLNRcI8oNkIJdG8kLW5NcMCkHW794W7LYW5TEhHu','WQrIWPVcJCk3W6pcVaHAWRy','W5tdKxTUo2q','tZNcMmoQW6VcQaKhAXBdSKrWya','WRaqWRj1v2vwW6xdKq','W5OcWRm','W5pPMQNPL7pLPO3LIzFVV6q','WO1LWQm9WPlcNGxcS8kqWQO8rW','vCoPqvRdOmk9W7iwt1pcSLtcUSoU','WQqUWOZdRshdU8kmlSkAWR08BwdcNq88pCovW5i','g8kmrCkFWOlcK8k8W4NcTrG','c2JdHf3cHfhdRCoqjq','tCoZrNhdNCkX','5RwS5yM+5BEO5lMqW6C','g8kmrCkFWOlcK8k8W4NcTrJcIa','bHNdPCo4WOy/DthcJftdOSojW55H','WQj8WP3cJ8kNW6pcMHO','cXFdVa','WPeEW5pdQNddSeu2W4JdKKy','WPT4WRW3','WQ1wn1/cPSk0ESkEWRq','pNGK','dmkmWQhdOau','eNtdPdxdOwNdLWa8','q8olWQpcPdfnlCkOgs7dM1ZdTmk1W6LVW7LHWPtMN4tOG5tOJA3LJRFLUkpPKRdKVPJMG5u','W4DRW5tcU8kayqeWW7RdLxy3WOZcJYm','qCoCWQxcMcPTomk3dW7dN00','WRhdMgiR','W4NcRSkwWOS','W4xcOmkVWQldTW','CeDREw3dKCkmW4mSdwO','W5LQF8ohCCo5WPaE','W4r2W404W6KHvCozW4tcQ8ocW6NdTfi','5P2Y6ikg6i6w5yYC55Ed5OIx6yU35P+F5l6g5OkW','WOyKWOLWW6zlW4TCW6ZcMhn6WPDCWRdcPN0bzuK','WQ1ypv3cKCk1ra','W4FdH2fci2L9drNcGNlcKq','bYzOEcybW6/cVsq9WP1lAry','rLNcLhZdQmkwaSkPW5uBjCk5WQbF','W7
2024-06-28 15:38:28 +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.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"])