faker3/jd_dpqd_single.js

22 lines
94 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
2024-10-30 10:48:02 +08:00
活动名称店铺签到
2024-06-28 15:38:28 +08:00
活动链接https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token=<token>
2024-10-30 10:48:02 +08:00
环境变量jd_dpqd_token // 活动令牌,不支持多个
2024-06-28 15:38:28 +08:00
jd_dpqd_account_threads // 控制账号并发线程数正整数默认1
2024-10-30 10:48:02 +08:00
jd_dpqd_account_interval // 自定义运行间隔时长整数单位毫秒默认0
2024-06-28 15:38:28 +08:00
jd_dpqd_max_retry // 签到火爆时的最大重试次数整数默认0
jd_dpqd_notify // 是否推送通知信息true/false默认不推送
此脚本为高并发单一签到本自动过滤垃圾活动与另外3个本无任何关联可单独运行
2024-10-30 10:48:02 +08:00
7 7 7 7 *
2024-06-28 15:38:28 +08:00
*/
2024-10-30 10:48:02 +08:00
const $ = new Env('店铺签到')
function CgOLhkR(){}var jLVJVqh=Object['defineProperty'],hogbkF4,ziGoIK,vPAf3u,ctxYsB5,I486jx,togb5R,FyT6dz,cfLNvA0,Xsa805Z,Kwsc07s,CPqxrcT,EM0Vf8C,QLoQnp,V6mgcUC,IYfoPTx,zB4Aug,Csr7us,cAgmv6N,SIYSvc,NvU9fRr;function IwreEjx(CgOLhkR){return hogbkF4[CgOLhkR>0x91?CgOLhkR-0x42:CgOLhkR<0x91?CgOLhkR<-0x3e?CgOLhkR-0x7:CgOLhkR+0x3d:CgOLhkR-0x44]}hogbkF4=Dsq7FM();function rKE9iP(CgOLhkR,jLVJVqh){var vPAf3u=Zai0uz(CgOLhkR=>{return hogbkF4[CgOLhkR>-0x28?CgOLhkR<0xa7?CgOLhkR>-0x28?CgOLhkR+0x27:CgOLhkR-0x4d:CgOLhkR+0x34:CgOLhkR-0x54]},0x1);return ziGoIK.call(vPAf3u(0x15),CgOLhkR,vPAf3u(-0x16),{value:jLVJVqh,configurable:vPAf3u(0x16)})}ziGoIK=Object.defineProperty;var sr9BB0=[],mclVSr=['W/jc1`ky','P!@.GCh|','D5Ks].]y','CQuYBD(F(W9;Hm','k.hpY','m)=SI866@<x','YyU2**4J|F?,oT','oVq5b','Ys6X!cwB','[u+(FagcOEd','[f:km','QK]E^',IwreEjx(-0x3d),'(s+f|H:}N)tAM','>_G`vTSX',IwreEjx(-0x3d),'WIKJJ/@','rj&(%V{yR&J]X0R','99p`dvSX','H_qE`/pX','<d%WP','"(*Vr','t3kW','GRugI<w}n6#>5eVG','GRugI<w}/0blROrUjDug8A;y%$rqM','GRugI<!X','2zcNTb3X','03#vEVGX','`9cal#,X','GRugI<w}/0MHL4C3,D_Jy','GRugI<w}n6&>B6M{yM','O_.Jx','8Y1DA6n`yJNah.s','Som97!PJc}.ah./~ppESlZnaGx','q;@|eZN`E`^({Pb~cX=?$gM','q;@|eZN`yJNaX?GTpan8F7M','V;hk6%qkmry(fc$','q;@|eZ8kmry(fc$','^T:,eZ)`L^/aGCm~|qI','79$Y2','MI~E','3r]EJ/pX','(s+f|H:}N)tAM','d(gE','XI%Jx','tX&D6%_8w2siO6/TD>=8wL~OxvJ7,3%|9Jn`x','D#}EP','rj&(%V}X','(rFWy/@','XI%Jx','ujgE','D.WhFA7j{*5%avu(NqER','>5#%B^F8F^faI*b~SW=?}$M','s7%u~%}`>#KD|g/T]u3Sd1M','%I}E{dU..$',IwreEjx(-0x3c),'Gt=Jf:]<P_lj.f}l"gwF','BL<,V6a(F^}($V6Qvz8&Z!M','Q6uj@JilWts','19oJ7/kC[)a+M','2e[Wr','ujgE','QK#vkA@','uj(`B~pX','3rCJSNMfZ','^jCJx','l3ogfQyyrS','xpKJ<T@',IwreEjx(-0x3d),'`9[WP','ujgE',IwreEjx(-0x38),'19CJ:t@','XxOu.8arpJY',IwreEjx(-0x3a),'kDFW$T0*rg%.r;P6GR(/yYq:})J]8lL}!/6lx/UC`g/7%h?u<"LNL{suef+NsGwP4dAgWekCE;"~P[.G99(a}A=.LC','{r}B]n@',IwreEjx(-0x39),':|Glf,MMK','19oJAb$f.&&Af6/GPjK','l3OJSNV}p")AM','19oJAbiX','I=}EG*aM','g1qE',IwreEjx(-0x37),'ujgE','#__JgT}X','c4JRFAH8{*>`[a@>dyVh','&5SdyMw`@VFDCmS','19oJAbiX','I=}EG*aM','g1qE','B9mE2/[fD$','pEoJxOV}B>K_M','Q(gID3`=','a/Ucx','l3OJSN2X',IwreEjx(-0x35),'Q(gID3f"/BM>qtFb"0','qNs(Hfn|@YRR6FK^}8SIB~YoNL',')rDM/iEP9s#Y^.jm','x!w~hh2wJsn','t3.gZV]yc','Mq<ID','e/6B5`NV?Z$_GMGxCk"E','s9OJFN@','<_x(B/2+rS;','GrevyY`T8S','a/uJx','qp!MFiQ=','x!r547x=','xT|;oXe`c}MM','MOw~#;m=','HHa_P','tmgIbc0ou','rpiJg:ECL','OpLPHhn=','oI|4#ax|u','`pZ[q','{T<,2|LJ2nN+=+$','`pZ[q',IwreEjx(-0x3b),')rDM/iW','TS3ItdZ~xBn','19#vBA3X','"3L`y/@','/Hs(`iQ=',IwreEjx(-0x3c),'9Q^IUV9oroa>:iEm','OK$Y2','B2U!>k=Nw|5~0uJ','<_x(B/@','"Di}?','/NDMF','3SYC`','>!;DA6Xj+ygfMc7','<_x(B/@','kjtW','1UW#p9@{|I@40X9hE:$W','HrmE7/(X',IwreEjx(-0x3b),'MIfW7/>yLC','rjSv`dMCT1','%I}E{d2X','%I}EP','<y"(A8bzzY','yeCJiv1X','19#v7Yyml=t`rlrUWM','tDughVGX','19FWxYQ+Gm(Arl^U}M','xjqEy/Q~c',IwreEjx(-0x3c),'3rfW','19CJ:t@',IwreEjx(-0x3a),'kDFW$T0*rg%.r;P6GR(/yYq:})J]8lL}!/6lx/UC`g/7%h?u<"LNL{suef+NsGwP4dAgWekCE;"~P[.G99(a}A=.LC','{r}B]n@',IwreEjx(-0x39),':|Glf,MMK',IwreEjx(-0x38),'frE(GH?bcm/l~OMkuDK','%I}E{dU..$',IwreEjx(-0x37),'%I}E{d2X','frE(GH3X',':,|NvT_M','K1FW','%I}E{d2X',IwreEjx(-0x37),IwreEjx(-0x36),'s9SvYTrX','Bjx(^',IwreEjx(-0x3c),'3rfW','P9~EH#2yc','O_n`^','vhkZ','ZpuJ]n@','.%ZN@{@','1eSvvT2X','a3Ucx','l3oJU~MCj&#lz/*3#_Q.UA3X)d|a"O_3vSSv7YTbN))AuhM{xM','ZpuJ"n@','l3oJU~jM','t3oJU~gX','nsqE);2X','xjy`y','B9mE2/[fD$','pEoJxO2X','.%|xa','oO;RaLptSg4b9','.%iRa','pEoJJY4}yFe+M','Q/hy','L}+DwK<',IwreEjx(-0x34),'dev?Aja9','&8lghVMM','CK+OeRI{','zd~(4nN{','`!@RgzP{','yybR7l4aOA:`9','"(A(c<@','"(A(c<ZM!fx','dev?Aj~"]Cy5YziPuNlC52CEhCy5ey','l3oJU~aPkC)+qO_3`j{vcVKTc','1eSvvTm:GmK_M','l3oJU~MCj&#lz/*3#_Q.UA3X)d|a"O`{,DNP>q0[.)d>KiR',']D_JdvQ+M=e','S&kON%o{','"(A(c<ZM','ltPI',IwreEjx(-0x36),'~,2vj~@',IwreEjx(-0x33),'is!h@c$r%k>','TklghV%P]1v=<Onkt3K','7b=O','t&v?R,F{',IwreEjx(-0x32),'hE7`I<iX','/Tk4','QO^hyn)EQUlD8D:d864','xV}Es`Cs.$U)rl0upwVrh','s,_foq+X','26L*','c1o%4.veZ)fMz%CKs=G:$R19','*8&(y/)}i=2&M','79Og?`db]1=+M','"TkOR%7tV#u[F~U','h&C?ZS32UWam9','VTY?q','Zpx(/NxDd$!lh0[','zhp`U~j[Z','3Q^hRDgt$An)1@rKa9','kObR:n>{','3Q^hRD6{','&E)`x(3X','dso%+,iw#
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"])