mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
20 lines
62 KiB
JavaScript
20 lines
62 KiB
JavaScript
|
/*
|
|||
|
活动名称:批量店铺签到(活动查询)
|
|||
|
活动链接:https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token=<token>
|
|||
|
环境变量:jd_dpqd_tokens // 活动令牌,多个用英文逗号分割
|
|||
|
|
|||
|
查询活动信息主脚本,IP限制严重建议使用代理,请勿频繁运行
|
|||
|
自动去重并过滤无效活动,默认过滤垃圾奖品活动
|
|||
|
运行后会在本地目录生成缓存文件以用于签到脚本使用
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('批量店铺签到(活动查询)')
|
|||
|
|
|||
|
function aHafWFe(){}var vZhWuI=Object['defineProperty'],LIcgch9,jrSlwSx,qwPUBOI,Pq9APAh,gT4q8J,q2mvSww,ZJEZdTt,R6WGAua,vX5HJE,rhG4k8q,cx0AY8a,fbvXbW,NraehN,aX_qiks,ZwsHyiC;function AU5cOR(aHafWFe){return LIcgch9[aHafWFe<0x93?aHafWFe-0x2d:aHafWFe-0x4]}LIcgch9=Or_eke();function jhr3fmb(aHafWFe,vZhWuI){jrSlwSx(aHafWFe,AU5cOR(0x32),{value:vZhWuI,configurable:AU5cOR(0x5c)});return aHafWFe}jrSlwSx=Object.defineProperty;var xywSJv=[],uXeLpc=['b?!+3Wk@o','?NsYn$)d','1v9:Sk~d','~EIP7_kAkD1.Rh','0E(CB','#q=;MX!+','rqM`','Be^YyyhNHTpm+/','+,D_t','fq2HjE5G','T[<d#~DE8J:','<06=9','jP=KZ','4u|}3(Mc','1dWVh','T?<UM','YJnV','w&g561.v0~H>GkUwvy','z`PO1(q','w&g561Cc','m;f?"Uwc','C;*lM*q','*:eOz','0WgOo05c','^^rNo}=c','omk}k}q','jPH}n2q','g^?Npf`c','JM_O|tyl#','Z^_Oz','4u|}3(Mc','JM=KOD`c',AU5cOR(0x2d),'[eV"I2,^8<GWx}g?tXxR<Cr)OU:xU:n(i^{bacJGeDWW!7ra[upR=2_6j<iAIxs?Z(7j}S}c',AU5cOR(0x2d),'{u_OrYq','cz*geSxM`O3','T?<Uae.f9','n[IVA($<M5WeMoh~w&?Ds3Xrv7O=SQ%vCD~QzDE_N5D,W"Fg1T%t%84gkl!t4w.h+d25Vkn_KoTfhBewuu?xv2Le%_','8Mvp=0q','6hO9fNYyZ"[WNc','r@wQlRyyP','YJ,x"UK_#','QJ/5ljssM|','NuBVh','tt}*=r_','yADH','"xy*ic_',AU5cOR(0x2f),'04XKux&c','EdRJ+I[$nuepl','=[!l((C!,]a','7x~K%[by]','x?Ks|tUv9','skPO"(q',')M]K,D>s%_','lO3H#1uyw<','{u/O2iAlebb2l~Dwh^P','"xIJjk[$E4g2l','PARJ2L8C','6LvKw<xy','KP.d','W6vKh','0ppJKW$C','9+O&I2)S8<>NBxq>dsU"<Cmn}/qlY{e(6~%','`K/Oz*Uvp>?2MQZEvy','!t{dA[8yk@||;>g`a)eJu3@<tj','Mp+Vn12l','O`IKw[bC','V!/J+','kD~pGNtUF#A:wywz_nTK','4u*OItq','1:z?pDm!M|o','wMk}s3N(S|','Y1`J+','!TsV>1EC','gZ`.N)g]','z(@o/ckN9vyy','QJ/OEfy_S|00&Z7g3NhV%UPz#','<JyYz0by]','x_yl]B2]',AU5cOR(0x2e),'IbFz/o*:/hHyqy1','mkBVM','*PA3m','1:z?pDq','TuNBH?[c','>[IK','PA0rn2xC','4xw*y1_','y6fK','Ie@?f','um=s2qCtXyK3l]#','Mp+Vn1_','nt+V>','p^z?Z','n^YV','mkBVM','fT,H!','VUX3z&}$kg72l','.=_zT%k*yJkYl(%W^9c_',AU5cOR(0x2e),'mkBVM','{uIV','04XKuxzeeA','*PA3m','y6lV,D?c','~"=$d2xj/<j*)If[7ekT{n4OwvP/2s_','i:ZOe=wc','*:0N"(q','r:vKODQy','*R@th<wc','=[:Od}j!yLk','2_W+@De=pJjgO>{ojER[7pMP','2_#f`DE|p<QRPGSa8(?B','`K/Oz*Uvp>P:y',AU5cOR(0x30),'mkBVM',AU5cOR(0x2f),'p^z?Z',AU5cOR(0x2d),'M^sNz',AU5cOR(0x31),'nW$x)','F3$xbd|?m&&b?~%Zr(W','.f2#','g^5K','MAnx+!Q)_vJbC','<(2#','=[:Od}j!yLk','QJ*O|tUv`T72y','{u/O2iAlebb2l~Dwh^P','2Hpl+','g^5K','vuk}=H8s9','sk_Oa}{c','}"n#','#`gO=0q','eW#tq8q','{k|}}(]rw]P:y','QJ/OEf&c','O[jeZDwc','Nu!}&(Mc','I`th>Xwc','/|*5P`~c','?M*O1(kc','AJ)tZ','#`gOT0q','QJ/OEfxhn_7!X*:JN^8}9UP(9','z^sNs','^^rNo}q',AU5cOR(0x30),'pu]KmD`c','"kN6','*@sQ_Jq','{uIV^nPz#','n[IVA(zy','bSQ5"Uyy','lJsK[O~c','Xn$MP1mc',')?dO>Xwc','66:O+tPzKA%)y','T?2?91q','T?2?91#yClz','{u/O2iAlebb2l~Dwh^P',AU5cOR(0x2d),'fRm}^fq','n^YV','g^?Nd}C!D]a','(nQ5"UWh={}L1*0nYJP','T?<Uae.f9','+:=K','vuIVO3{c','_u:5mDg_#','"K,N61ac','kS]P','"K,N61Le"&tQjQ%nj|P','zUvK4N]q','uuqK)Hac','1Rt)Jfq','"K,N61Le8oIb2kvR{uP','}4`DPxI[RLYWXDlJ^=8%CO4y','<Sb?sD7vaLmby',',u*5FN&c','`M*Oz','<S]KOD+v.#of{$&','NulVRpGi&7zby','r2qPQ','4dezBUe9jgKDE6q','{EdT)bpq4','n[IVA($<M5WeMoh~w&?Ds3Xrc','G",NOQ>vCA1L4d!Jzy','1l>kAM*@','5EtTkD,@','bK7Nz?Jc','n^`Ds3g_#','5EtTkD]vKgMOcE|8P/','#6WO+NLBaLIo}6','g?+lFN@y',';x1lQ','aa>k}Uw@','*P/Ov','?MWON3#z#','n[IVA(}y','=z5HiiF@','#8qP','nzXT%_{vA19','?4!lc`ac','&avlQ','QxpkkBhe4',AU5cOR(0x31),'=[:5xj=c','o>LVpbs','o>>k0iv@','1:m}ZDn_#','kPfK','G"IV','M^|}R3`s9','#*.w9','?4!lc`ac','Y93Njiac','<N?:^"Kn%UFVe','n<;#8','``?Pp&~+}E','kPIVM','(R2?CHRc','2dy?mD`c','XCtwCJ|hD','[H8}^f@_#','{thp9%ER','NdXp}+`2v3g','4;YN,t|c','R`Yw9','(R2?CHfvOLmXy','66!}NDQy','g^:5h','``?Pp&5q<3zVe','):ZOBUks9','~[:Od}vc','+SXKsDjf9','P1EPP_3Ks8','w##wM,u','"#T!^,u','8:!}^fq','N&4wV=qr<8j','dGQpx+ER','1!)pM+QR','>*EPL&6((>,6e','d7:5e=`c','E^%V','suIV#U=s?]D2y','P~)p[+B?v3Z/CgG','hC.w#PUhWED"q`','P~)p[+~+t>+6xbW)','su/O3t=sk7.`R$&','}RwNJfHU,]A:fu+JVy','hkwNODs!^A/>p~!J~y','x?8hWxq','x?Lmd}mc','x?Lmd}UvtA','RC7%Z|/n7','RC7%[<(R7',',D[?s3Rc','&6:Ohd`s7WG}Mj~|OR7mEHLEYdQ2<vL4;Y;9','.RuKWaMslBkQTPQR5Hhxn$ac','X:X9|*^_15og&*~MY4O2{(6o9','/S8}YjdBUb:W<=`M|9P','X:wNh!?JFBpvoz1ZRU%#]x4g9_ux2=NhT"b:8?{`]uX2h$B','^[HV(8(B^Tl{c(DNf0r2}=AE^"','M^N6wJ&{+[Q2A~;S','zH=9*aQ#x|Xyy','XSqsM!S`eWzXZ)k4Xbr2!o?on]4ttvs
|
|||
|
|
|||
|
// 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"])
|