faker3/jd_wyw_lottery.js

19 lines
38 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称玩一玩欧洲杯抽奖
2024-06-29 17:05:17 +08:00
环境变量jd_wyw_lottery_threads // 控制并发线程数正整数默认1最大3尽量使用默认值否则请开启代理运行
2024-06-28 15:38:28 +08:00
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('玩一玩欧洲杯抽奖')
2024-06-29 17:05:17 +08:00
const _0x114055=_0x4d34;(function(_0x3dc3bd,_0x100f09){const _0x3649e2=_0x4d34,_0x5a09af=_0x3dc3bd();while(!![]){try{const _0x22f9c7=-parseInt(_0x3649e2(0x1d9,'SrqN'))/0x1*(parseInt(_0x3649e2(0x196,'R3y9'))/0x2)+parseInt(_0x3649e2(0x1b0,'skc1'))/0x3+-parseInt(_0x3649e2(0x1f0,'@^&2'))/0x4+parseInt(_0x3649e2(0x1f4,')#ib'))/0x5+parseInt(_0x3649e2(0x17c,'6y)$'))/0x6*(parseInt(_0x3649e2(0x1fc,'^OQ4'))/0x7)+-parseInt(_0x3649e2(0x1cf,'R3y9'))/0x8+-parseInt(_0x3649e2(0x29f,'R3y9'))/0x9*(-parseInt(_0x3649e2(0x2a0,'ST%j'))/0xa);if(_0x22f9c7===_0x100f09)break;else _0x5a09af['push'](_0x5a09af['shift']());}catch(_0x29b6d6){_0x5a09af['push'](_0x5a09af['shift']());}}}(_0x118e,0xdce8e));const jdCookie=require(_0x114055(0x26f,'!Yp2')),notify=require(_0x114055(0x1f1,')#ib')),common=require(_0x114055(0x168,'zf@$')),{H5st}=require(_0x114055(0x1cd,'ST%j'));let linkId,taskThreads=process[_0x114055(0x244,'QxVf')][_0x114055(0x20c,'7apz')]||'1';const runInterval=process[_0x114055(0x276,'4[vG')][_0x114055(0x23c,'4[vG')]||_0x114055(0x1e3,'^OQ4'),isNotify=(process[_0x114055(0x1ff,'nQWY')][_0x114055(0x284,'#D@K')]||process['env'][_0x114055(0x26c,'7apz')])===_0x114055(0x226,'zf@$'),pinFilter=(process[_0x114055(0x296,'M7%1')][_0x114055(0x221,'w7P#')]||'')[_0x114055(0x20e,'[[84')]('@');function _0x118e(){const _0x16a0f8=['W44xfe1maCkEW5C','m3FcOCkjWRJcHG','W7y3jSoG','WOHgf1q','iSonpW','W5dcPColW4q','uhqgvsD0mq','W4BcOCopW4NdP8kuWRy','W7ZdGfxdMYpdOq','W6JdNfxdTZ7dRtWM','xSkEpCol','ESk3a0lcKxhdTXj0WRJcJ8ozh8o3W4hdISowFmolwCkFWRC3W5O','6lEz5y+q5PAE5PwO','W7i9nSojDCk7pexdJGnxWRtcOCom','vHDtgW3cR8ogsa','hmkRWQpcQ8kmW43cRYZcJSkYamkwb8k2ntddPCoYv8k5Cmkpia','6AA/6Akk5AwL6lAA77Yj','W4NdUL3dMaTprhRdPJPQW5ZcNSkVWPq/pb13','WO7dIHe','gCkDW4GGDYbOFa','W4CGaSkz','zSkIbfNcPItcJfr4WQ3cLq','W6vxBCkTWObZfCor','WQTGW6zDi8ofeqKCir/cLr3cPtTu','WOr7WOOwwSkbW7NcV8osvwuKASopuvKNWPFdRIvFumovW7NcLCkNr8oUgCorW63dNNBcHG','W5JdVCkIESk2umkBDK4hamkzzmoteSoenNldRM1qmSkUWPC','ySoAx8kf','ebbwW4HZWPrR','WOjiWQFdUwnJpKhdOfimlKHli8opp8olWQa','WQ49W4m','AmkiW4/dVHrxW54w','jCkXW6ayd2RcMhCRd8kOtmkMWRmppwFdKSoWyYa','4PIUWPxOH5hLRitKUitOVzxOOjxPLRBPMkVMLzdPLBdOR53NV4ZPLjBORAy','W7xdPSoUdSkXW6iBW79tW5z8W7uOC8oIWO7dNSkxxahcNYJcTa','DKiPW7/dOCoIWOS','W7vHWOjQW7DexL8bW70','WQHKW6z1','4PY2tUADUEEDQ+IVQ+AXIrO','fbPq','5P6R6k2a5lQJ5yQ05AwG6lE677+U','rHDueq','W7W2iCoPB8k4mfG','imo7rGBcRI3cIgrGWRW','gmokeW','W6zxD8kYWODYf8odWOVcMJhdISkm','fhBdJG','WPvmWQhdLg9Kh1pdOhi','jEwLHoI0KU++TG','smkCimowzCknsLqwdtewemoPW7ORzr/dOG','WRldNt44hGjFxW','sx0HiMWwcvRdQG1D','WRmZW4m5W69SAvecW5hcLsGRWQ4','44k+5O2p56st44kf6k6D5ywZ6i6w5y+FW5euDCohWQhcRW','WOZdSvK','W7xcLmkLEsy','W6/dHuJdMIldKtGXW5q','WRJdMZC','WPddKbH+WRqp','DSkhW4xdPG','W4ddU8k/CmkGpSonkuO','nmosW4NdTLy','WRtcUqZcL03dKqBcLxJcMrNcPa','W6xdTgBdGCoXehZdTL85W64','4P6Zb+IfPoACJoI/T+IGOEMcI+wkSos7MoMwM+IUIxy','5y2w6yw65BY75zkX54U75Okezh/cGSkBmL7cNZlcTmkn','W5lcSCorW4BdSSkEWRXZ','w8kkoSo6FCka','b0bHW48','WRCGW5KOW4zgA1Wt','WOvHWP0kxmoFWRpdOW','bmoqb8kn','W4FcOeCrWObGW7PLW5dcLa','hCokbW','fbbzW4TIWO4','gu9RW5FdICoaeCkN','cWbhW4LKWQP9EutcILhdQNxcJLy','kFcFGOyw6l6s6kgl57Qr5PYzpq','5lQ/5yQY5AEs6lAT772X5RgX5P+v6i+O5yYt5yQr5lU65yUtWQGC','dq86W7PiyLFcMq','W5xLRjhMIAVVVRpLJO/MIAdLPkG','WRRcI8oXqSk2Ca','5l+65Ogf5yMo','W4ldSe4','tJ3cNmoyW6ZdU8oCWQpcPCkGWQ9shq3cRI/dMaFdVCkdxa','W5JcQ8oy','FuG6','44cc6lEL5y6a','WP3cQHJcPvinew3dOdH9W6BcJq','WQq9W5q3','tHLh','W4FcS1WkWOHAW4PHW4NcHG','W4JdTKxdOa9j','W4NdUL3dMq9iuMJdTr4','evfmW5tdSmongCk9y8k5W6pcN3xdUsVdPSkC','yHfQASkQWOL7pZeKWRyjW6/dLJ8KCSkmW6dcObldTbpdRCojW5pcH0/cSsVdJa','aGHW','W6/dUhW','FSkMgvxcLIm','pmodnNe+WRi','FSkSea','5lMa5yIM5Awp6lwt77+U5RcA5PY16iYj5y+45yIo5lU15yIlW6P5','ECkIWOZcRa','jSodk0uJWRBcMJTcwtT2nCotpW','WOjQWPScE8oEWRVdV8ofqe9LAmkkuLHaWPRdPs0i','omkGW6qikhW','W5RcPCosW4a','eWaWW6jPB1/cJW','gW0NW6DQyK7cLvXIzmo9WPHte8khW6uKWQa','W7hcHSkuEZzqbrlcISoevSo0','DsFcS8ozkCkeWReu','W5tdPSkW','W7ZdOSoEeCkoWRfzWRLxW7b6W7WOuCkTWPdcMW','nhlcKCoPemkJWPG+WRhdGa','evj7W5ldM8ok','A8owW4mT','5l6V5OcY5yIwqG','W5eic1roaCk/WQ8mW6CegCobB1G+','ySk2bfO','WRtcVqpcLK3dLfxcHvJcJXNcT8o8','W4uOgmkzWPNdIbu','WQmjk8oCw8kTlwtdIrXyW7lcMCozW5b
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"])