faker3/jd_dpqd_sign.js

23 lines
66 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
活动名称批量店铺签到
活动链接https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token=<token>
环境变量jd_dpqd_tokens // 活动令牌,多个用英文逗号分割
jd_dpqd_task_threads // 控制签到并发线程数正整数默认1
jd_dpqd_account_threads // 控制账号并发线程数正整数默认1
jd_dpqd_account_interval // 自定义运行间隔时长整数单位毫秒默认0
jd_dpqd_max_retry // 签到火爆时的最大重试次数整数默认0
jd_dpqd_prize_notify // 是否推送中奖信息true/false默认不推送
此脚本为高并发签到本需要读取主脚本生成的活动信息缓存自动过滤无效活动
7 7 7 7 *
*/
const $ = new Env('批量店铺签到')
function QdHAte(){}var VDFqfxW=Object['defineProperty'],ty1nHk,s6O0ij,sB72b_,byMIyf0,oHCm0M,zdW680,vNLWPc,dEEkRtL,GzLLLh,hghxkZ,mNbc7y,LBhmIVy,qEjo0uN,mhV1dlW,A98bkK,mt8G4B,mBftyqN,W0wzhP,R7iAXAa,cgdYLl;function ztjOYo(QdHAte){return ty1nHk[QdHAte<0x1?QdHAte-0xf:QdHAte-0x2]}ty1nHk=uSRA9bI();function gf_zkQd(QdHAte,VDFqfxW){var sB72b_=Qm1Xv8(QdHAte=>{return ty1nHk[QdHAte>-0x2f?QdHAte>0x57?QdHAte+0x1f:QdHAte>0x57?QdHAte-0x44:QdHAte>0x57?QdHAte-0x2f:QdHAte+0x2e:QdHAte+0x57]},0x1);s6O0ij(QdHAte,sB72b_(-0x26),{value:VDFqfxW,configurable:ztjOYo(0x30)});return QdHAte}s6O0ij=Object.defineProperty;var Sghmfe=[],xLnOGl=['HvXLWb8V','/7_&upF/Y','<XELR7_r','=Xc2lI_3','iivSXOk','}^ub2','oaUtcC~~J$9','24wgIISX+&GiVA','VfF;l','?oGcA^k#','zqQ_9IR^{%8','z^7EA','$Qqg6',ztjOYo(0x2),'~J/iX38H','UKQ11WE','8bv)C7A;Dv1qH[D','JJF!Ii/HUvC258?m;y','(ICU|','^mPU','VDBMK(,xLa2T_R7Vxy','4FQ1(3E','VDBMK(,xLat:NVr&W~}1^2dGd','VDBMK(,xW[p]D`8.bwBM<n9;Cf8@y','VDBMK(#H','z"j=3pmH','[m2ig7VH','!Jjl]2eH','VDBMK(,xW[y:t0Gmew}1;','VDBMK(,xLa?LD6ZBcm@gJ7>sd','`}N14','<XkwnaL!;1=lhN~','/uYJ*#|1jxNlhNW>FFg/]dLlV4','@9EcRd=!g!6)A|p>jHO5fMy','@9EcRd=!;1=lH5V3FlL<%*y','79hPaC@PY8;)Sjf','@9EcRd<PY8;)Sjf','63?eRdZ!t6WlVGY>c@K','LCB19L)xlYwslV;a{)n)6','*JfXz','yK>g','m8qg1WFH',ztjOYo(0x7),'HKC14','^HvwaC}<,z~r`aW3wTO<,t>`4i1*emCcJ1L!4','w2xg|','8bv)C7xH',')8%U;WE','HKC14',ztjOYo(0x2),'BbMg','wNUh%n*bA+_CliB)=@gD','T_2C&6%<%6SlK+p>/UO5xfy','~*CB>Cx!T2QwcMW3qBm/Iky','w2W=33PG;%=]y',ztjOYo(0x4),'|J}MF]Np=Zw>lVD','rwF!FcE','KKsi!WE',ztjOYo(0x5),'CKxgAI.NNf',ztjOYo(0x3),'wNUh%n*IemqP6%cqp_vDi~TSY8R97}d3rOKbv#>`qXj50k&sfx_$b','8b/i!IyG3k','CKxg|','kJu1*WPGoZlsy','zRoU8',ztjOYo(0x3),'$Q2iPnE','Bb)!&>FH','m8G1/=ySd','6bG14','CHjKZS:','H1)L;i%+','y|hL&~AZ_','<|jK','f|nG)S6+','Fgu14`7x&TQ}y','9BEDsmZZH%','J|%LO[H+',ztjOYo(0x4),'!JoU|','&qIs[[&+','48%U8','$R`^','qwsS33`.:k${y',ztjOYo(0x5),ztjOYo(0x8),'&JYgzWoSwf','L~@gJlDH','Fgu14`zH','lW.j4','&qIs[[bIunN','`B3D]i&Z_','MCGZ%giy_',';RQ1h3E',',HnGuSC+','x^sKuSC+','CJIs+6N+','U7)L1U:','t1`K','S8g)V:5pjYW]>`yPBwQ','CKxgAIzH','o^yG0','o^yGAQv33P','o^yG0','CKxgAI.NNf','ihPd',']6Y}&>:','3o]g:A:','kR/ii3Y?VYQ}y','9BE}vUx{1V~9.S"B~Rm3vkB+XQwM*FRBL%%LuO[8gXXkYaxA5x','dFB1{LE',']mu1.>l|PGZs@`}m!bAij7Q3j','4b;!;','11Wl2L:','f|nG)S#sqP','Fgu14`zH','MSv_5','MSY}5','Fgu11X0x;%Rsy','ahl^','FwZ9{B:','<|jK1t@5]','Pw%Uf3[+6SK2o@BV9z=S2pSN!SK2wK',',CQ}=(p+','KK}10=Q4gft:y','h!j!A)y','{)n)j(dy#S4','UG!#ksb?vKP','0}qg','y|jK}O<+','GJ}MzWBGd','7x.#c)PJ','DOKN','7x.#c)2T7+]8L8Y&L[N','5iyGJl{J3PvXH9!Y6?iHa','J7RsE(I+','q[r6','i~FWQl%weO^C@WSmbqAt#1~y','+<v);WZxrOzvy','.Br60#kq1{2?H','"TnG}Sey?]2U<!;','!JSUe&_pDZ4vy','?T#K0','Z:=!v]HH','p;CSZOA+','"hF!.>bod','Pw%Uf34y','VThl`}A+','9z=S2pmH','caul}9=ybPdrJQIB5x','KxE(Y)PJ','_h*!1]Tx#f(Oh$zBUy','&G:vzWU5Z','I7.#(8,`b")2L7F~QH','Zcl(u#2gP2oesc','YCes4lwx','{BKxm','"T)L;i%+','^^R}eg&+','`Qu1x',')8C1!Xd4d','mGE(f^PJ','.%l(=','zJqz4ga<z%cHx','mBG((vN=Z','#D;]Vv&5Z','^E?sG/y','`%jA)*g|Y','pi_I"gdx','BbMg','6R*lo=:.j','x8nj(^o.t','H1Zl5','!R~=6WPGd','F@E}y','J|%LO[H+','dR5CfS!x','l)%U','T_u4v','pHhLZOI+','v2F:ia!cM790</;V?$do','CJIsw,WygX`kx',ztjOYo(0x6),']mu1.>yG</LLD6ZBX!|Ut7Q4d','{}ZMw~&Z_',')h#KH',ztjOYo(0x6),'f15Cz',']mI1.>rH','Y1DG',']muMS$;;8/',';J%U','Y1DG',ztjOYo(0x7),'Y1DG',ztjOYo(0x6),'qw}1IixH','@<!K',ztjOYo(0x3),'@}]jU?{;t','9qSU1)]y','V7js+=(y','kJ2i*X;Y]O^!8]8.Uy','^wBMh7VH','kJ%U4X$sVY)n8]6.xy','4b@g;W$>j',ztjOYo(0x3),'T}V!i3/H','kJG1?^E','8bziD7/H',ztjOYo(0x8),')8%U;WE','xJRiq2A;j',ztjOYo(0x2),')~sSHFrH','0Q&[KDY',':8Yg',ztjOYo(0x2),'L~4)X3E','zRoU8','Neqg','^jX!$prH','(}zi6WPGd','RQ>g','_h%U','8b/ieXF;j','x)_}G','KKsi!We></','KKsi!Wly','RQ%U8','}Qu14','JJ~=wL1;#I{Kh[qclm0S>3E',':}61o7R;j',';Ju1}iZ;U/j:pK','ieV!m>e>bv>L.aUV','3en)#2eH','nIy)zWFH','Y#FZ#,f0;','EavMF>kH}','vF0BjQ+6','h?YBd>X6','f5*7','~"^!*=/H','6x]Zj','h?NB~Q!>^nfI"','kh{Qm','xxIMB{<.(K@_"','AEoZGMO6','0<@g;W$>j','MG+MM3K)5H','iI/ii3zH','1}}1&+E','Uo|%k4P','A}sib>E','~WB1nqpo)Gw','"hF!.>,>#ZSdq6fc~y','g=+Mm{i^^g4i"','Gno7eS.`(HE',';J%Ud7q;)YWny','ieV!m>#s*YRTJrh','ieV!m>iy','w5kQJr&6','0#LZpQv6','C^iBM3+6','(hIJkU)OQnN_"','ieV!m
// 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"])