mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
30 lines
127 KiB
JavaScript
30 lines
127 KiB
JavaScript
|
/*
|
|||
|
活动名称:组队瓜分奖品 · 超级无线/超级会员
|
|||
|
活动链接:https://lzkj-isv.isvjd.com/wxTeam/activity2/activity?activityId=<活动id>
|
|||
|
https://cjhy-isv.isvjcloud.com/wxTeam/activity?activityId=<活动id>
|
|||
|
环境变量:jd_wxTeam_activityUrl // 活动链接(必填)
|
|||
|
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分钟
|
|||
|
|
|||
|
队长无效或无法创建战队时会退出执行,并发模式下也支持入会
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('组队瓜分奖品(超级无线/超级会员)')
|
|||
|
const jdCookie = require('./jdCookie')
|
|||
|
const common = require('./function/jdCommon')
|
|||
|
const notify = require('./function/sendJDNotify')
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
const { wuxianDefense } = require('./function/jdCrypto')
|
|||
|
|
|||
|
var iil='jsjiami.com.v7';const i1iI1II=li1i1I1;(function(IIl11ii1,il1II1I,il1I1II1,IIi1iII1,l11l1iii,iliiiI,liili1l){return IIl11ii1=IIl11ii1>>0x2,iliiiI='hs',liili1l='hs',function(Iili1ii1,iiIi1lI1,lliI1lI,IIiIl1iI,il1lIlli){const i11i1iI=li1i1I1;IIiIl1iI='tfi',iliiiI=IIiIl1iI+iliiiI,il1lIlli='up',liili1l+=il1lIlli,iliiiI=lliI1lI(iliiiI),liili1l=lliI1lI(liili1l),lliI1lI=0x0;const IIlli1Il=Iili1ii1();while(!![]&&--IIi1iII1+iiIi1lI1){try{IIiIl1iI=-parseInt(i11i1iI(0x712,'0l4P'))/0x1+parseInt(i11i1iI(0x6f5,'Yi&b'))/0x2+parseInt(i11i1iI(0x228,'i4C^'))/0x3*(parseInt(i11i1iI(0x167,'*ZbT'))/0x4)+-parseInt(i11i1iI(0x55c,'rpuX'))/0x5*(-parseInt(i11i1iI(0x260,'Yi&b'))/0x6)+parseInt(i11i1iI(0x2e8,'Gl$S'))/0x7+-parseInt(i11i1iI(0x479,'UuM2'))/0x8*(parseInt(i11i1iI(0x4e4,'I25q'))/0x9)+-parseInt(i11i1iI(0x3bb,'jaTI'))/0xa;}catch(iilIll11){IIiIl1iI=lliI1lI;}finally{il1lIlli=IIlli1Il[iliiiI]();if(IIl11ii1<=IIi1iII1)lliI1lI?l11l1iii?IIiIl1iI=il1lIlli:l11l1iii=il1lIlli:lliI1lI=il1lIlli;else{if(lliI1lI==l11l1iii['replace'](/[gHnQfMbPNBkGqFTwEreWyC=]/g,'')){if(IIiIl1iI===iiIi1lI1){IIlli1Il['un'+iliiiI](il1lIlli);break;}IIlli1Il[liili1l](il1lIlli);}}}}}(il1I1II1,il1II1I,function(IlI1liIl,l1iii1II,I11I1lli,llilli,ll11ll1l,IIiIiIil,IIliI1il){return l1iii1II='\x73\x70\x6c\x69\x74',IlI1liIl=arguments[0x0],IlI1liIl=IlI1liIl[l1iii1II](''),I11I1lli=`\x72\x65\x76\x65\x72\x73\x65`,IlI1liIl=IlI1liIl[I11I1lli]('\x76'),llilli=`\x6a\x6f\x69\x6e`,(0x16c53c,IlI1liIl[llilli](''));});}(0x330,0xcfcd8,iiIl1l1l,0xce),iiIl1l1l)&&(iil=0x1b1e);const activityUrl=process[i1iI1II(0x3c6,'jaTI')][i1iI1II(0x18b,'e*nd')]||'',joinMember=!(process[i1iI1II(0xeb,'MUt*')][i1iI1II(0x119,'rC58')]===i1iI1II(0x310,'Gl$S')),isNotify=process[i1iI1II(0x4bb,'cAl(')][i1iI1II(0x425,'Css*')]===i1iI1II(0x751,'Xkmh'),concMode=(process[i1iI1II(0x17a,'sYj*')][i1iI1II(0x589,'Xkmh')]||process[i1iI1II(0x348,'Ol#V')][i1iI1II(0x6f6,'rpuX')])===i1iI1II(0x71a,'p0xH'),concThreads=process[i1iI1II(0xee,'UuM2')][i1iI1II(0x273,'Gl$S')]||process[i1iI1II(0x5cb,'NHif')][i1iI1II(0x65b,'p0xH')]||'3';let concTimeout=process[i1iI1II(0x5cb,'NHif')][i1iI1II(0x1e3,'rpuX')]||i1iI1II(0x6b3,'r]@M'),concMaxRetryTimes=process[i1iI1II(0x17a,'sYj*')][i1iI1II(0x6f8,'UwBq')]||'0',cookie='',activityCookie='',originCookie='';function li1i1I1(_0x10ae80,_0x115889){const _0x3f0650=iiIl1l1l();return li1i1I1=function(_0x3c8d97,_0x41bd41){_0x3c8d97=_0x3c8d97-0xbd;let _0x41cd1b=_0x3f0650[_0x3c8d97];if(li1i1I1['nnLyQd']===undefined){var _0x389afb=function(_0x4ac4c4){const _0x3283da='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x37fc8e='',_0x4367ec='';for(let _0x17112c=0x0,_0x90a723,_0x1cc911,_0x56f9c6=0x0;_0x1cc911=_0x4ac4c4['charAt'](_0x56f9c6++);~_0x1cc911&&(_0x90a723=_0x17112c%0x4?_0x90a723*0x40+_0x1cc911:_0x1cc911,_0x17112c++%0x4)?_0x37fc8e+=String['fromCharCode'](0xff&_0x90a723>>(-0x2*_0x17112c&0x6)):0x0){_0x1cc911=_0x3283da['indexOf'](_0x1cc911);}for(let _0x5b7823=0x0,_0x131bba=_0x37fc8e['length'];_0x5b7823<_0x131bba;_0x5b7823++){_0x4367ec+='%'+('00'+_0x37fc8e['charCodeAt'](_0x5b7823)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4367ec);};const _0x12f270=function(_0x23d2f2,_0x16e12e){let _0x208fe8=[],_0x369bdc=0x0,_0xb94bd5,_0x45e020='';_0x23d2f2=_0x389afb(_0x23d2f2);let _0x112100;for(_0x112100=0x0;_0x112100<0x100;_0x112100++){_0x208fe8[_0x112100]=_0x112100;}for(_0x112100=0x0;_0x112100<0x100;_0x112100++){_0x369bdc=(_0x369bdc+_0x208fe8[_0x112100]+_0x16e12e['charCodeAt'](_0x112100%_0x16e12e['length']))%0x100,_0xb94bd5=_0x208fe8[_0x112100],_0x208fe8[_0x112100]=_0x208fe8[_0x369bdc],_0x208fe8[_0x369bdc]=_0xb94bd5;}_0x112100=0x0,_0x369bdc=0x0;for(let _0x39fdcf=0x0;_0x39fdcf<_0x23d2f2['length'];_0x39fdcf++){_0x112100=(_0x112100+0x1)%0x100,_0x369bdc=(_0x369bdc+_0x208fe8[_0x112100])%0x100,_0xb94bd5=_0x208fe8[_0x112100],_0x208fe8[_0x112100]=_0x208fe8[_0x369bdc],_0x208fe8[_0x369bdc]=_0xb94bd5,_0x45e020+=String['fromCharCode'](_0x23d2f2['charCodeAt'](_0x39fdcf)^_0x208fe8[(_0x208fe8[_0x112100]+_0x208fe8[_0x369bdc])%0x100]);}return _0x45e020;};li1i1I1['hVtWak']=_0x12f270,_0x10ae80=argum
|
|||
|
|
|||
|
// 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"])
|