faker3/jd_818red.js

20 lines
54 KiB
JavaScript
Raw Normal View History

2024-08-17 21:11:05 +08:00
/*
活动名称超级818红包活动
环境变量jd_818_url // 活动链接\ID 都可以
jd_818_threads // 控制并发线程数正整数默认1最大5尽量使用默认值否则请开启代理运行
jd_818_interval // 自定义运行间隔时长整数单位毫秒默认2000
jd_818_notify // 是否推送通知true/false默认不推送
jd_818_pinFilter // 账号pin过滤多个用@进行分割
高并发脚本谨慎使用并发
活动限制IP严重建议使用代理
随机定时
*/
const $ = new Env('超级818')
var il='jsjiami.com.v7';const l1iIl111=iII1iiI;(function(ill1iI1i,l11li1Il,l11illli,IIlI1l1I,liii1ll,i1111iIl,I1i11i11){return ill1iI1i=ill1iI1i>>0x9,i1111iIl='hs',I1i11i11='hs',function(I111IIll,l11Il1l1,liilil1i,Ii1iI111,Iilll1){const lIlli1Il=iII1iiI;Ii1iI111='tfi',i1111iIl=Ii1iI111+i1111iIl,Iilll1='up',I1i11i11+=Iilll1,i1111iIl=liilil1i(i1111iIl),I1i11i11=liilil1i(I1i11i11),liilil1i=0x0;const I1ll1l1l=I111IIll();while(!![]&&--IIlI1l1I+l11Il1l1){try{Ii1iI111=-parseInt(lIlli1Il(0x166,'(i2('))/0x1*(parseInt(lIlli1Il(0x2cf,'#ilO'))/0x2)+parseInt(lIlli1Il(0x293,'l@O['))/0x3+-parseInt(lIlli1Il(0x1ef,'2cM3'))/0x4*(-parseInt(lIlli1Il(0x2b9,'#ilO'))/0x5)+-parseInt(lIlli1Il(0x1de,'5&Be'))/0x6*(-parseInt(lIlli1Il(0xeb,'zIZ7'))/0x7)+parseInt(lIlli1Il(0x200,'wP(Z'))/0x8+parseInt(lIlli1Il(0x173,'2cM3'))/0x9+-parseInt(lIlli1Il(0x2a9,'[AqX'))/0xa;}catch(iIl1IiiI){Ii1iI111=liilil1i;}finally{Iilll1=I1ll1l1l[i1111iIl]();if(ill1iI1i<=IIlI1l1I)liilil1i?liii1ll?Ii1iI111=Iilll1:liii1ll=Iilll1:liilil1i=Iilll1;else{if(liilil1i==liii1ll['replace'](/[XYhwFMVfTxGWPOCEIyrbu=]/g,'')){if(Ii1iI111===l11Il1l1){I1ll1l1l['un'+i1111iIl](Iilll1);break;}I1ll1l1l[I1i11i11](Iilll1);}}}}}(l11illli,l11li1Il,function(lIi1iiil,iliIIil1,I1iiI1ll,ilIi1l1I,IlIil11l,iiil1lI,lIlli1I1){return iliIIil1='\x73\x70\x6c\x69\x74',lIi1iiil=arguments[0x0],lIi1iiil=lIi1iiil[iliIIil1](''),I1iiI1ll='\x72\x65\x76\x65\x72\x73\x65',lIi1iiil=lIi1iiil[I1iiI1ll]('\x76'),ilIi1l1I='\x6a\x6f\x69\x6e',(0x17eacf,lIi1iiil[ilIi1l1I](''));});}(0x18a00,0xe9381,Il1Ili1I,0xc7),Il1Ili1I)&&(il=0x23ea);const jdCookie=require(l1iIl111(0x2d4,'yVhj')),common=require(l1iIl111(0x217,'POES')),notify=require('./utils/Rebels_sendJDNotify'),{H5st,jsTk}=require('./utils/Rebels_H');let red618_url=process['env'][l1iIl111(0x1fd,'POES')]||'',redshareId=(process['env'][l1iIl111(0x298,'5&Be')]||'')['split'](/[,@\n]+/g)[l1iIl111(0x2d8,'1#OP')](liIiiiII=>liIiiiII[l1iIl111(0x105,'syjB')]())[l1iIl111(0x19f,'5&Be')](Boolean),maxdraw=process[l1iIl111(0x262,'Si%b')][l1iIl111(0x236,'dOzb')]||'1',taskThreads=process[l1iIl111(0x1aa,'bcV[')][l1iIl111(0xff,'l#Y%')]||'1';const runInterval=process[l1iIl111(0x16b,'R]Vr')][l1iIl111(0x226,'POES')]||l1iIl111(0x24d,'uLOZ'),isNotify=(process[l1iIl111(0x272,'syjB')]['jd_818_notify']||process['env'][l1iIl111(0x275,'dOzb')])===l1iIl111(0x223,'r4dy'),pinFilter=(process[l1iIl111(0x261,'a!!@')]['jd_818_pinFilter']||'')[l1iIl111(0x14a,'yVhj')]('@'),endTime=0x19166378018,maxThreads=0x5;let unionActId=l1iIl111(0x2ed,'Q)[D'),actId,Referer,cookiesArr=Object[l1iIl111(0x1a3,'Mn3#')](jdCookie)['map'](i1I1i1il=>jdCookie[i1I1i1il])['filter'](IiiIi1iI=>IiiIi1iI);!cookiesArr[0x0]&&($[l1iIl111(0x2cc,'[O4@')]($['name'],l1iIl111(0x2c9,'syjB')),process[l1iIl111(0x11b,'(i2(')](0x1));const prize_map={0x1:l1iIl111(0x2ad,'RTlN'),0x3:l1iIl111(0x221,'IB(Z'),0x6:'[打折券]',0x11:l1iIl111(0x240,'Si%b'),0x12:l1iIl111(0x2a2,'dOzb'),0x13:'[超市卡]'};function iII1iiI(_0x2b13e6,_0x216c2a){const _0x2d2cd5=Il1Ili1I();return iII1iiI=function(_0x580b1d,_0x5ad6ab){_0x580b1d=_0x580b1d-0xe5;let _0x2292e0=_0x2d2cd5[_0x580b1d];if(iII1iiI['kSaZim']===undefined){var _0x3076ac=function(_0x4f4999){const _0x174163='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xfff208='',_0x15c334='';for(let _0x3c21e1=0x0,_0x4b770b,_0x47dc8a,_0x3c2d4a=0x0;_0x47dc8a=_0x4f4999['charAt'](_0x3c2d4a++);~_0x47dc8a&&(_0x4b770b=_0x3c21e1%0x4?_0x4b770b*0x40+_0x47dc8a:_0x47dc8a,_0x3c21e1++%0x4)?_0xfff208+=String['fromCharCode'](0xff&_0x4b770b>>(-0x2*_0x3c21e1&0x6)):0x0){_0x47dc8a=_0x174163['indexOf'](_0x47dc8a);}for(let _0x2d76eb=0x0,_0x458fd9=_0xfff208['length'];_0x2d76eb<_0x458fd9;_0x2d76eb++){_0x15c334+='%'+('00'+_0xfff208['charCodeAt'](_0x2d76eb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x15c334);};const _0x11e784=function(_0x405f72,_0x1a7a3f){let _0x39db92=[],_0xc4c88=0x0,_0x4b3cec,_0x1d2123='';_0x405f72=_0x3076ac(_0x405f72);let _0x3f57be;for(_0x3f57be=0x0;_0x3f57be<0x100;_0x3f57be++){_0x39db92[_0x3f57be]=_0x3f57be;}for(_0x3f57be=0x0;_0x3f57be<0x100;_0x3f57be++){_0xc4c88=(_0xc4c88+_0x39db92[_
// 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"])