faker3/jd_wyw_lottery.js

19 lines
54 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称玩一玩欧洲杯抽奖
环境变量jd_wyw_lottery_threads // 控制并发线程数正整数默认1最大10尽量使用默认值否则请开启代理运行
jd_wyw_lottery_interval // 自定义运行间隔时长整数单位毫秒默认1000
jd_wyw_lottery_notify // 是否推送通知true/false默认不推送
jd_wyw_lottery_pinFilter // 账号pin过滤多个用@进行分割
高并发脚本谨慎使用并发
活动限制IP严重建议使用代理
cron:1 1 1 1 *
*/
const $ = new Env('玩一玩欧洲杯抽奖')
var il='jsjiami.com.v7';const l1I1Ii=iii1II;(function(I1ll11,lI1lIi,Iii1Ii,Iii1Il,i1l1I1,lI1lI1,llIl1){return I1ll11=I1ll11>>0x6,lI1lI1='hs',llIl1='hs',function(l1iIiI,illlli,illlll,IIIIiI,II1I1){const l1I1Il=iii1II;IIIIiI='tfi',lI1lI1=IIIIiI+lI1lI1,II1I1='up',llIl1+=II1I1,lI1lI1=illlll(lI1lI1),llIl1=illlll(llIl1),illlll=0x0;const i1i111=l1iIiI();while(!![]&&--Iii1Il+illlli){try{IIIIiI=parseInt(l1I1Il(0x1c2,'JHX5'))/0x1+-parseInt(l1I1Il(0x150,'t5I('))/0x2+-parseInt(l1I1Il(0x198,'t5I('))/0x3*(parseInt(l1I1Il(0x106,'Eziz'))/0x4)+-parseInt(l1I1Il(0x1e7,'OH]t'))/0x5+-parseInt(l1I1Il(0x256,'L[@N'))/0x6*(parseInt(l1I1Il(0x2db,'WpV]'))/0x7)+-parseInt(l1I1Il(0x118,'l[^L'))/0x8+parseInt(l1I1Il(0x221,'wvJJ'))/0x9;}catch(ii1l1I){IIIIiI=illlll;}finally{II1I1=i1i111[lI1lI1]();if(I1ll11<=Iii1Il)illlll?i1l1I1?IIIIiI=II1I1:i1l1I1=II1I1:illlll=II1I1;else{if(illlll==i1l1I1['replace'](/[yxtVHWuqRghIDQdPGb=]/g,'')){if(IIIIiI===illlli){i1i111['un'+lI1lI1](II1I1);break;}i1i111[llIl1](II1I1);}}}}}(Iii1Ii,lI1lIi,function(lI1lII,lIill1,iiI1i1,ilIlII,iIiil1,l1lI1i,l1lI1l){return lIill1='\x73\x70\x6c\x69\x74',lI1lII=arguments[0x0],lI1lII=lI1lII[lIill1](''),iiI1i1=`\x72\x65\x76\x65\x72\x73\x65`,lI1lII=lI1lII[iiI1i1]('\x76'),ilIlII=`\x6a\x6f\x69\x6e`,(0x171e33,lI1lII[ilIlII](''));});}(0x2f40,0xbcbb7,Iii11l,0xbf),Iii11l)&&(il=0x3009);const jdCookie=require(l1I1Ii(0x264,'J#3o')),notify=require(l1I1Ii(0x176,'g9p$')),common=require(l1I1Ii(0xc7,'Eziz')),{H5st}=require(l1I1Ii(0x2d6,'L5^]'));console[l1I1Ii(0x2c3,'gpbr')](''),console[l1I1Ii(0x1a8,'pwtb')](l1I1Ii(0x2df,'N%p)')+$[l1I1Ii(0x265,'262L')]+'变量说明=========='),console[l1I1Ii(0x259,'Yy4C')](l1I1Ii(0x1cc,'Yy4C')),console[l1I1Ii(0x22f,'v%4(')](l1I1Ii(0xcb,'l[^L')),console[l1I1Ii(0x164,'Inw!')]('jd_wyw_lottery_notify\x20//\x20是否通知(true/false),默认不推送'),console[l1I1Ii(0x257,'!nwr')](l1I1Ii(0x249,'RYjW')),console[l1I1Ii(0x276,'Vh4@')]('=========='+$[l1I1Ii(0x273,'%[UR')]+l1I1Ii(0x29b,'kSyU')),console['log']('');let linkId,taskThreads=process['env'][l1I1Ii(0x121,'pluT')]||'1';const runInterval=process[l1I1Ii(0x1cb,'gW@&')][l1I1Ii(0x216,'L[@N')]||'1000',isNotify=(process[l1I1Ii(0x2d9,'CXoN')][l1I1Ii(0x23d,'R^x%')]||process['env'][l1I1Ii(0x266,'!nwr')])===l1I1Ii(0x14a,'v%4('),pinFilter=(process['env']['jd_wyw_lottery_pinFilter']||'')[l1I1Ii(0x1f1,'RYjW')]('@');let shareCodes=[],needRemoveCodes=[],hasGetBasicInfo=![],cookiesArr=Object['keys'](jdCookie)[l1I1Ii(0x208,'qMM7')](iiIi11=>jdCookie[iiIi11])[l1I1Ii(0x2e5,'pwtb')](ill1II=>ill1II);function Iii11l(){const iIiilI=(function(){return[...[il,'DgjWWVsxqqjxiabmHiQRg.cWIoPxumy.GQvdt7bh==','Ab3cGWiTW5u','sSoRESowAW','W6lcMCoSqJi','WQNdILDOW4Gix0e','n3JcT8ofWQm','fMOZW5hdIW','WQSvcNHr','WOrSECoNCG','WQqWa1PTWOjY','yINcMqqV','pmo4qCoGW7RdIa','c8ooWQi','W5pdMCkogsddMIvfWQerwIWqxeS','CbNcNG4qW4NdHatcVSo9WRVcUG','rfm8qW','WO5aCSo7g2FdTqlcUeddSmkoWRG','khVcUq','W5ldICkthtVdUbrnWQSbta','aCkQWQBdLSkRW6q','WOK6xSoBWOCRymkv','vfCHEIaglemmaG','W4tcSSoTzslcOW','WQa2fa','aeRcSSoQWPC','bmoor0KQWQxcHLxdRHpdPNiXf8kIqCoYn8oirSo8ea','kSoEBmoXW60','W5pdLsi','W444gvpdKa','5RA75yUw5BE/57IY57IZ5PYn5lQNW5q','WRCXs8ovWQy','kCkUia','hSoEr046WRW','WOC2WRFdTwK','W7FdVfbChG','W7rLW7FcULBdPMlcKCo9W5BdKxehWQJcRtDsWPxcG8kSWR/cHCkMqHhcLmozW6VcLmkGWOtdKSkZWOlcVSkEW4bEmIpcQb5FwmkqebJcJcmzf8k4WRVdRLKqkq/dPbq1yCoFeCoWASk1W4OrF2rsk17dKCkXW7FcMshcMGdcNh7dN8kiWOZdKNRcMmkipI/cLrPmwfWMWPDMW5hcRLVcVWKFW5ldNeddSmkJWRRdMmoGW5ddKtpcISkVWQVcGcBcUI3cG8oyCG7cOmkivSkOW7RcILhdQuX+zCoiFcxcQSkCW5hcQConWQtdSSoteMpdVmk5WO0v','W6/MIQxLIRKS4P2nrG','mSo6WP5tb8oZ','k8kKiSoIy0S6WRvfWP5/W7nBpmowWQhdHxj1WO/cVG','AmkOf2ddKa','CCkmigON','W7NdMCk/bIO','dSovWQb3W4BcMa','dfSGWOa','WPKWw8kXWPW','WR/dQmoFdXqz','W7egBmkhWPe','kq52','y3mhwbC','pGJcNmk+','WOtcGHxcGvT7','jbRcKG','a8ozFW','W4BdLfvNba/dU0LaFd8SW5fU','WRP1zSow','4P6KWRFMNkxOGldMRiFNOQpLPlNNK5tcGW','WQ7dMepcGsVcMMi','bXXI','nf8FW6ldTW','FffVWP19','WPypWRBdVNq','W53dMrFcOb4','WRu2i3rg','iMaTW7pdIG','ibL4W5a','rfuFxty','WO1/W6pdRG','W4mHj1ldGW','h2FcSmoyWPa5WQvJqmkm','WPVcNr7cRuPS','WRe4WQBdN2pdMWlcIZFcMCowW68S','8lo4NGy','D1ePWP0JWQn/W4
// 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"])