faker3/jd_red1111.js

18 lines
84 KiB
JavaScript
Raw Normal View History

2024-10-14 17:05:11 +08:00
/*
活动名称双1111红包
环境变量jd_1111_url // 活动链接
jd_1111_threads // 控制并发线程数正整数默认1最大5尽量使用默认值否则请开启代理运行
jd_1111_interval // 自定义运行间隔时长整数单位毫秒默认2000
jd_1111_notify // 是否推送通知true/false默认不推送
jd_1111_pinFilter // 账号pin过滤多个用@进行分割
cron:0 0,20 * * * jd_red1111.js
*/
const $ = new Env('双1111红包')
function fakers3vz4(){}var fakerlq41m=Object['defineProperty'],faker679f3l,faker48lsw,fakerlao9zk,fakeri01uyt,faker9g8k0f,fakerv6xrv,fakeraeljks,fakerdvkzqq,faker9nbgea,fakerwqzu9,faker88pos,fakerord4yu,fakerorbb6,fakerxfqf2b,faker87t6pg,fakeru51wed;function fakerrqgu3j(fakers3vz4){return faker679f3l[fakers3vz4<0x3d?fakers3vz4+0x25:fakers3vz4+0x8]}faker679f3l=fakerxi1tb();var faker7qpd94=[],fakerntr2l=['"qAK/%ND','+Ofy~<d!v)|s)j','^$pR4=gc','zg;sWI"P78<$,','%hC]UYgj','RLuB&','crG;w','<XaB','CDYir0o/?HPW>1','CDYir0o/?HOh/"','Qm!ERYT','Z1pk','MhW],','XwNkE6mj','CDYir0o/?HZ=,:gXWI!','CDYir0o/4FVcwHq0:r!','CDYir0o/?HQI0HgXB1Nk','h<y1D','CDYir0o/4FI%(FZ7iZ','CDYir0o/4F|%(FZ7iZ','MhzEQ','CDYir0o/4Fw^(8Zat.f{A','KNzw&KT','q_esA',fakerrqgu3j(-0x1c),'j1uEQ','<jI.Fuhd[A9:MF6Y.%#d["pMQUEq0Xu2_EW]Q','.?+k&','#gXHn6g]XF','9D`F@8Yj0X=RB1','pe^RD8"N(X=RB1','#g.Va60SEX=RB1','/_K}R8}{dF','m9{C76A_(Ge=B1','wnIru;+j','rwyBi6T','j1uEQ','$_4Eq6aOvb`~Z','A}vBw','V!?UaxT','Knr](pmj','%bG15;{Z',fakerrqgu3j(-0x25),'3heh|UvZ',')EL{n|$j','XwOEg5Z{)',',nOEQ','=wok','u1+k7Ltzze',fakerrqgu3j(-0x25),'Kn*k','.zB@yxqL0XNa,y2N>lIDU9%{ow}^;h)Y:#1nI3pMNs/Sf$(~e+lVn','an<B);Ni/','an<B','rwuEQ','}6F(l]5;S)ehCZCQOack',fakerrqgu3j(-0x1d),'Kn*k','j1uEQ','$_yB7pt=(%rxw|,t+Z','(nQr,',fakerrqgu3j(-0x21),'ENf6o7f0ok3pWwJ0__=5Cx~^p$Y#cMN2phvB`Vlte%qVZ','WlDP`XC','(lcSu','x4@d','W9QrsYT','9_gUsYwj','Zc>HnBW]nQt^X&tYJDbdLF`8A;RlueGcAv+He2@sf>:o2G8}zZ','_^zZ,O9(:_j]YNN*HNQhRsfG+6.pVi','9_gUsYwj','g<RSa*"&q$H_[l5IQ<Z(5,g&qh5k}/=l.sp?i`m`Up"+fJk2"IO,[P8`Gy^~9~z>Un[?[?C','v}yBEsKOhOr~Z','Olp?w*je','c[RSPw>D0D]8f','V<j"T^(.[@5ZS^)','ul,$;QSW$D]8f','c[RSPw>D0D]8f','ul,$;Q<&<pLmf','Vl)F`<6{$Dk8:*JxXjZ(0?77lR','j4p?(zfD*W','7[DP1?We','Olp?w*je','~I#F$977jp','Wl#PG/gDcm;8f','&_pk=?Ai/',':`Y@1/[','Kn*k','i}OE:U$j','$_?Uqsio|#<]w|wtBZ','<.K*@;Cj','M!4ECrZOV#QI|1','RhQrpY:~LeVcZ','9_gUsYwj','|X4*{Viiwg','Xw{B','g4o_[E~nK(g.5tzY8ySSWu4B4>"S?b3N"+M}36|du','Kn*k','$_4EhUZ{CoW1a8GX<XyB','Q_M*J.(z{O#~%YF2<wC]hUii_y','A}vBw','$_yBQsV~Corxw|,t+Z','Qn8ki6Vp/','CE@/','p`I@9mUGNkl>%0,g}nRrFWVV`D','h&s5n','$_OEJ<T','1n+(q5T*]{[oBjB@_mb5}UBoH:Rq?!P7K9xri6kG^@k>vYEebhzjv;3io:5m(1z,G[u_Au%<pki61iAb)^pM1O`Lhw3EO&}"#_eNe,r0zjv;3io:2~uCF2n[1}gX{wxrE(50D{Q<@V`0M025{0,&}*"R_Kg0G!hE](eZFkF>T','&_i]J>gj',fakerrqgu3j(-0x25),'p0AUnpT',fakerrqgu3j(-0x22),'a.yBeYHGw*JWa8KC^A5{?>{z]{Z=W|HFmk4EQMcJ;c?pa8a+i.E,+~4vLg$zswS0+9p|}m3m<bf.s|LKoX@kl50j','CDh*',fakerrqgu3j(-0x20),'CD4*','tPF:',fakerrqgu3j(-0x1f),'Oy6LP|hQy','Oy6LmLl(X"','Rh25DYU))','fC9LP|vl<n18!u','&_5{`0.G.g=bZ','.up!F52','KCMv','zcTv','zcTv','}qQoM?2','tP20#pqE%lrO2','Y9t0(`Iyb','DkRh~OWay',';Ap!gUS3kl^].','ruQv}X*OO"','A{VxF','u1+k7Ltzze','u1+k&','&_nEE6!Q)',fakerrqgu3j(-0x18),'+_yBEs$j','U@a)','O_h*A6KO)','GdAUD;gj',fakerrqgu3j(-0x16),'Rh8k2GT',fakerrqgu3j(-0x24),fakerrqgu3j(-0x23),'M!4E+','i_4E?>5JY#c~Z','l@4Eq=5JY#c~Z','MhW],','|Xi]Hf<K/','&_pk=?Ai/',fakerrqgu3j(-0x19),'fhNk','Z1r`965~uI6|RC@',fakerrqgu3j(-0x1b),fakerrqgu3j(-0x17),'O_h*A6KO)',fakerrqgu3j(-0x1a),'Krf{S];Xze?xZ','P@m]tpnv)','&_5{`0.G.g=bZ','Rh8k2GT',fakerrqgu3j(-0x24),fakerrqgu3j(-0x23),'Knq]UYoJaO','Z1?UaxT','i_4E?>5JY#c~Z','l@4Eq=5JY#c~Z','Rwoe<','|Xi]Hf<K/','l:SA7;9_]','Fh<1','an<B','nni)<p)YF$',fakerrqgu3j(-0x22),'(nQr,','CwhEV>:j','anOEQ','5?{B%fL=e%ZRw"(dZ?{B%fTmFy2Rw"(d5?{B%fT','Trj"','tni`.WT',fakerrqgu3j(-0x21),'#/4*A6qjL*Z8:^"Ou?j"','T~U1@','CDh*',fakerrqgu3j(-0x20),'CD4*','CDaB',fakerrqgu3j(-0x1f),'z/)5DY;+/','z/)5M5O{Le','Rh25DYU))','Rh25DYkOAIb%U1','#/4*A6qjL*Z8:^"Ou?j"',fakerrqgu3j(-0x1e),'p0AUnpT',fakerrqgu3j(-0x22),fakerrqgu3j(-0x1e),fakerrqgu3j(-0x15),'/1ok]s7j','nnm))RnvRc+8t1','wni]Q','M!4E+','wn&B0sG>=#WxZ','`6KEQ','Cw}Uis]Ydg','mwuERYi+ug','&}8k|?T','yLm</%wc_/K','Cw}Uis]Ydg','mwuERYi+ug','&}8k|?T','y4c7;FdaN;U','Cw}Uis]Ydg','|XMEg5;+/',fakerrqgu3j(-0x1d),'N.hELUV~Z#}','A}vBw','Kn*k','(nQr,','P@s6QGmD1','#g.Va60S(GDsB1','|XLEtp:j','Kn*k',fakerrqgu3j(-0x1c),'e*]0Fu;QmE2^>/$',',Y<azdSiN;>','$_?Uqs~jrO]8Z','GH2o,','W9~{]6uv/O','Cm@*/%z','Kn*k','Kn*k',fakerrqgu3j(-0x1c),'e*]0Fu;QmE2^>/$','W9~{]6^p|#AI%Ywt2nok',fakerrqgu3j(-0x1d),'+_}UN?7i/','VG/V{',')mKENWT'
// 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"])