mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
19 lines
68 KiB
JavaScript
19 lines
68 KiB
JavaScript
|
/*
|
|||
|
活动链接:https://pro.m.jd.com/mall/active/vA3es3NAyG3b3K4bxLcpEQj3Aoa/index.html
|
|||
|
环境变量:jd_qfz_interval // 自定义运行间隔时长(整数,单位毫秒),默认2500
|
|||
|
jd_qfz_notify // 是否推送通知(true/false),默认不推送
|
|||
|
jd_qfz_pinFilter // 账号pin过滤,多个用@进行分割
|
|||
|
jd_qfz_num // 指定人数 非必须,不填默认跑全部账号
|
|||
|
jd_qfz_inviterId // 指定助力码 非必须,不填默认助力账号一
|
|||
|
jd_qfz_threads // 执行线程数(正整数),默认1
|
|||
|
|
|||
|
0 0,12 * * * jd_qfz_help.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('敲福字助力')
|
|||
|
function faker7xoad9(){}var fakerrt5kce=Object['defineProperty'],fakerbw05fg,fakerf6kg2c,fakerf9dvom,faker61a5q,faker1x7oz5,fakerxtdeck,fakerj4t7dj,faker94y0tc,fakerte7ed,fakerkw5v89,fakerstw3rg,fakerccga7o,fakere4fbm,faker64lsg,faker2r2x8,fakerwv93hu,fakerc36fd7r,fakerzfuzwd,faker8m14cg,fakerafrp9,fakerdbgbwp;function fakerczw02k(faker7xoad9){return fakerbw05fg[faker7xoad9>0x41?faker7xoad9>0x41?faker7xoad9<0x41?faker7xoad9+0x1:faker7xoad9-0x42:faker7xoad9-0x2d:faker7xoad9-0x4f]}fakerbw05fg=fakerulyxq();var faker8pqgk5=[],fakerzj9czp=['sG.OJ7N8','+"l@^R(X','T8:44YP','(eV{JFjm&V4=X$&',',,$_aJi5&t0pY+KnH`','~a0&@','xnF&','L:EH.;vY>ic!P,1re`','L:EH.;vY4IpCY+a>/f<','yah.:','L:EH.;vYFPpC3;2W','L:EH.;vYNjpC3;2W','Gg/mq','L:EH.;vYoPqt_=0L_,]&','q$<m~E(','L:EH.;vY4IgMjADrB+[9','L:EH.;vYFP^6`','4+P)','V<9{B!0@j0|qCT!FunS{&Tsp9jn','Z,%O#','`.Q)','n+})mN$5','aX9)',fakerczw02k(0x42),'x5ty80gWl#SdG8NEy"6Wl]QGqJmZfn0?,m!_q','ype)@','+UtX0[e5','X+h&HN(','5.0mq','I,zmZNFu32bB`','#s3&+','c<pJFC(','rUX_{Q$5','n+umiM`|v','ydZ+z','Fyh&%ED^1|=ps,RnfyL_RMF^1tR6~Nw,Y<iJvK2KjiD$`86WDnSMsmBKZP8o(1_8VXCX1','2|ct^k[*Y*~BS','C1=rkO5G','#&4ZWefYf*B,S',fakerczw02k(0x49),fakerczw02k(0x44),fakerczw02k(0x43),'y/&=hCZafn}F1h?}okt:JS"|P+sj[gvEd6.Ut7QG}O*YRI{B%ekcU','pgBJUQ(','y/&=/NUWmn}FXmVaaHD3L>OFm+hyI/7EW>Ail%$kE/P^8*ODEIF=9;j_dnK"9&Bj5!LDT,`m|//','ype)@','rU9)',fakerczw02k(0x42),';j(?svM_dpKBvneRu/dHnVc[Wnse2my$(S(DO;m,fnCv&.','I,h&TQ>4{"XC+A1>e`','{UqX1','"gL_JEi5','aHFFsvCW1CP','+UiJ_a`uEI','n+|&','zqaV26y`WK4cH','MqsoC+^3r','k]w3^Z(',fakerczw02k(0x43),'HsumdJI5','I,pJZOHPA6x_+A+>&`','xyr9=[L5','G<zmLX`uc6qtA.','~gqXQEdBa%cV`','"gL_JEi5','S,iJOE+5','Anz9|cHH+i','n+|&','izP,lmBUr{iyM>/E;hYY!0z&zo]Yp27}]eGs7NAW0','I,h&qOcBLPXC+A1>e`','qU;)HNcQ*','LsTt','YC)Z','[j=F80;FP+HX|*%','I,umKx(','rU9)','3sh&mOruguXB`','NSgmxpvuv',fakerczw02k(0x43),'AnGm~Ekr46{;TG/L;=4MUQh4BPjB`','0.e)@','0.e)Ta>//%','AnGm~Ekr46{;TG/LlW0mq','AnGm~EU3v','!SB|_NvE/ttCY+=','&.<mmNxr*','vt&4yww!I_g<w}}b',',v1lL','sN8{k_M[Yv%gL`LquFyX<E}5','3sh&mOruguXB`','!SB|_NvE/ttCY+=','NSgmxpvuv','0.e)@',fakerczw02k(0x44),fakerczw02k(0x46),'+UH_q','_sSM1NFuv','G<zme','u,})ky)uaizC`','rU9)',fakerczw02k(0x45),'rU9)',fakerczw02k(0x45),'rU9)',fakerczw02k(0x46),'G<zme','I,zm{QcK0t=;A.','rU9)','I,zm{QcK0t=;A.',fakerczw02k(0x43),'AnGm~Ekr46{;TG/L;=4MUQh4BPjB`','G<zme','I,zm{QcK0t=;A.','rU9)',fakerczw02k(0x45),'rU9)','AnGm~Ekr46{;TG/LlW0mq',fakerczw02k(0x43),'e,sJ}pTH*','vU@vh','v$rm}!(',',sx.Zn(','IsiJJEPKLP<g`','ih=Fj<GlkWut&=I;2{z)Z','NPlFYqf','P)yFA=}RdW:t]$#;ark?p>&9','Jf!_jJ#T[%{;TG/L','I,h&?p2H+i.5^.THpgammOL5','Jf!_jJd5','Fpn~','Apa|a','$+iJygI5','*SiD5Bm9N','ih=Fj<pnN','_/|$','$+zm9z/~j9C[(','pp!|7.)Np]YC[','I,h&UF<qv','Fyh&)>?^v%+j1j@8L:XNHO;K?%ejwN^n@<z9,[uE*','$$OF3?TA)]vk[','{OG1^qf','AnGm~Ekr46{;TG/L;=4MUQh4BPjB`','yDLtDQf','AnGm~Ekr46{;TG/LlW0mq','Z+pd:','lp1)','4Xam";L5','4Xam";L5','3Oz)','e,h&mOI5','u,g9#Nruv','_)b|$jd9','v$Q)3[CvUt2"VGHFWUP)yZ2H,hp"^ASfAnc<y@1y5','=)Z_.~6/=:MAcA]Fci<','q[e)S_uS/%>2+ADr$l[+=','=)Z_.~6/TjhtCsefI,<','.eP`r.f','^WtXHN2ed6#t`','b{=1X|EQzsWC[','4mJ)F`3R5N7>sV#','NP>)n}8NpwocY=emsw[Kx|7!,w<WEL#;Bhe?rqcRD','AF"@p~PH+i2BDsaHLy8)','AFP*NEd5$aUoLDBnq`','^W#J:[i5','x_P|+>pnN','%r6~]<V4:1!q%tl;7Z?M0QMIa1"O[U4hZpv?.<D&.oMqf&*lA03NXBAH&rr>7_%;vH6~i0Qe2SfI$3G&m#=1oFtRb2S','AF"@`;U3M%R6!=mT&`','PO`?,};9','Fyh&%ED^+9K!F;rLj#M|po|/*','<%T~X|WQiWew~v','is~H7m/~W9','rXR|Y_[n/%pC`','..gmRM}5',fakerczw02k(0x48),fakerczw02k(0x47),'J=Fv','H{pFF`TAN','r4.F|p$oI','pgBJUQ(','@,UmmN<qv','Rg})','e,h&mOI5','J=Fv','u,g9#Nruv','rXR|Y_[n/%pC`','.Ue{ZM(9_|lP&5&=,$2MsJ&PDd~Zp<wTrSCXHN)^j=)o`EP%xX/53[7HPdM${./1^l0,#0"xQ)HN.H#2vjQG.ubag+7mu@s]6,%}%1Xf/53[7HPd?B0L8?Ul.sin|+CXm{Y%09wPZ501J*e)HNs*{X1o+5H0"<$_nQPK4)FCq3@0`:bM$?k~W9TCI5Y85p^.','~g;)?^(',',,=_o;(',fakerczw02k(0x47),fakerczw02k(0x48),'^<K_>QogouB6`','Qf#JUQ(','*.P)_OT5','s[fv2Lqms(HZR@','s[fv2L~~TP?L=b',fakerczw02k(0x49),'3$Z.(sE3XuXq,c?FJqtgxcb@O9#<.<*e}f%*','>FZ_?4S4?3#}F8*ufyu;vsdB72RVp1zes<Dv','SXm*8bv`','~qaJOx^rx=mf+]','R=F[z;Doj=z#p1*q9p/9HN43uPG0P,c?4n_#rOfT<','YfK.ua$PM9=DG=hnNgz@C}>ub3reDsZ#/*W/|jy`','"p&mp|q@0=DVm4}
|
|||
|
|
|||
|
// 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-L
|