faker3/jd_pointExgHb.js

20 lines
92 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称积分兑换红包 · 超级会员
活动链接https://cjhy-isv.isvjcloud.com/mc/wxPointShopView/pointExgHb?venderId=<店铺id>&giftId=<活动id>
2024-08-13 10:55:36 +08:00
环境变量
jd_pointExgHb_activityUrl // 活动链接
jd_pointExgHb_threads // 控制并发线程数正整数默认1最大5
jd_pointExgHb_interval // 自定义运行间隔时长整数单位毫秒默认1000
jd_pointExgHb_notify // 是否推送通知true/false默认不推送
jd_pointExgHb_pinFilter // 账号pin过滤多个用@进行分割
jd_pointExgHb_hotbreak // IP限制后继续执行true/false默认false
2024-06-28 15:38:28 +08:00
2024-08-13 10:55:36 +08:00
cron:1 1 1 1 *
2024-06-28 15:38:28 +08:00
*/
const $ = new Env('积分兑换红包(超级会员)')
2024-08-13 10:55:36 +08:00
function Ex3STd(){}var eK_AwV=Object['defineProperty'],lxwozS,xPOIxd,tO3pQaq,eHz7U_U,eEFiud,XyLjoZ,xTLLDBg,GnejEZ,v1uKsy,vdr_YH5,UXop1R,OBN8gH,UtxKWJp,AApQaIG,TZipKHW;function vW4KP7(Ex3STd){return lxwozS[Ex3STd>-0x35?Ex3STd+0x34:Ex3STd+0x50]}lxwozS=_LtuBG.call(this);function j724fMd(Ex3STd,eK_AwV){var tO3pQaq=dsl8pK(Ex3STd=>{return lxwozS[Ex3STd>0x89?Ex3STd+0x24:Ex3STd+0x4c]},0x1);return xPOIxd(Ex3STd,tO3pQaq(-0x38),{value:eK_AwV,configurable:tO3pQaq(-0x1c)})}xPOIxd=Object.defineProperty;var vZbqZB=[],dCK7Ek=['(r,PgBIF','V;|W4p;;#','}g6kwWuy?','^;1Rh"wF','gqmR(yZF','Om)4lRXDX<afjN','n8BhP','d06@H.??{+j','PoF|!!^D/O>:Tm','TqUAi','Yz{Il8Td','7Y)Bdkvd','V["cWju832v','$=n/j','wEr),','cO@KV5}6',vW4KP7(-0x31),'gOb7R?QA','qsE11mc','Qz>vX]<=u>1rAKu','OOYt_7bAq>XdyQxe={','k|Z8Yd$6IUS0SBKk','HeVq','BukZ:Ri?z>M("so:RE`ZO]h#z>l=E9M','BukZ:R/A','z5)J;j#{','Q3bqa@bA','puMq','BukZ:Ri?z>M("so:8QN)1m6<uUv','9Hhsu','BukZ:Ri?z>M("so:Tej)O]@0i','BukZ:Ri?z>M("so:Tem)O]@0i','*oL1G','BukZ:Ri?z>M("so:DYGvr"L!z>@;{','GYE1(?c','BukZ:Ri?z>M("so:9gj)C!}=u4#','COUR/','{s@)','eQr)1mYA','_vZ)',vW4KP7(-0x34),'HA>5nXoaW/g9*nm?5.&aWD@*G71C:eXTO1;tG','5d6)p','Qz>vX]6A','vQhq=mc','AsX1G','lO`1CmV%M4S0{',vW4KP7(-0x32),'wEd7VIc','kzvt8@YA','eQ%1b[{#i',',z%1G','vg0#AY9A','kzZ)','5LqfhICz<2+XS7kv[jS:2Fx^1]oS]oV?!zl>9Ae+LmXX04x95O8:rI%sw2!UhS=v,?OO','ss07tmXMJ%','kzZ)','5LqfhICz<28KS7+#rAZTLa*<#LdS5]a?xus3cF[*)p','lO`1V@:A','&Eo1$[bA','tODq',vW4KP7(-0x2c),'lO`1V@:AqUs^JK$edoE','8ON)/mM#5U','tzMq47uA','"e`Z#wlA','bp4t=','=]~vQ','=]~v2tU%Lb$5#jTVFeh[y[c',vW4KP7(-0x33),'5LqfhICz<28KS7+#rAZTLa*<#LdS5]a?xu&y6U^FhG','^QN)','Xs6)<_~LLU','Xs6)<_/A','kzZ)','5LqfhIC_:erV,hTr!+>u7g.#NQ|}]oi?9&sz>F@*rRJy$l80U6+wz','kzZ)',vW4KP7(-0x34),'lOhq<@~^8.vIQ",~6{','8zGv,','GO*Zx58L#%&0.?nTHQBto7==Oh','Qzb7t_{%?l','=|%197lA','GO*Zx58LJ','q&T[CR=NJ','bOao5;h^i','gOb7R?QA','"e`Z#w==Qb','lO`1CmV%M4S0{','1XO$:ku!n','+D3M2Cc',vW4KP7(-0x33),'=|%197lA','lOd7CR=N"&HtQ"Q~q{','H5kZf]BA','f)8J_:L{','.oBt7?bA','gOb7R?QA','"e`Z#wlA','"e`Z#w==Qb','eQ#q','b`NOW10zk8b5[~L?jhyy;X`q`!Dyd4FrD6*|Fm"aX','kzZ)','lO`1o7{#BN;sVj2eHehq','GO*Zx58L#%&0.?nTHQBto7==Oh',vW4KP7(-0x32),'lOhqGRw0BNvIQ",~6{','Gzj)=mw@J','vg0#T^x6[4HI{',vW4KP7(-0x33),'eQ#q',']}fVnXjVNQ=v#JU','GO*Zx58L#%&0.?nTHQBto7==Oh',vW4KP7(-0x32),'lO%1xHc',vW4KP7(-0x33),vW4KP7(-0x31),vW4KP7(-0x33),'bp4t=',vW4KP7(-0x30),'kzZ)','lO`1/2<0BNo','kzZ)',vW4KP7(-0x33),'Xs6)p',vW4KP7(-0x2d),'=OE1w!IM]4h>#jXT&)A','Y)CSvwY=J','Q|P)','`v*ZuS>LJ','wE%1#$^M=.#"8n}~B5Kq','wE%1#$^MphF0?sJ6<mE','#Qb7h[h^GU','zz&/4$.6J','vQX1G','|mn8+t&{','BVIZmC#{','2I)1,',',Y$px[bA','|mn8+t[]yiUoB{BG%VP)',',zYS:_/A',vW4KP7(-0x33),'~Qc)nSGLLU','iYk1}7i%o%dI3m2e','VzHq','eQ#q',',zYS:_~LLU','eQ#q','kzZ)','eQ#q',vW4KP7(-0x33),'kzZ)','lOCSawj=qb9.Mj2e6{',';ooZ/mc','kzZ)','f|n8~@!{','5ldGFS$','kzZ)','TzGv@?i{','f|n8~@fxrldIJD','kzZ)','6EaG9q$','eQ#q','okaG','Xs6)p','Xs6)<_~LLU','lO`1/2!{',vW4KP7(-0x2e),'pO_1G[9A','*E`16','=Od#tm9A^lS','rQg[_7GLLU','lO`18@wxX>fj"s','azX1G',vW4KP7(-0x33),vW4KP7(-0x33),vW4KP7(-0x30),vW4KP7(-0x2f),'+S}fsA`r|CE5lyn','azX1G',vW4KP7(-0x33),vW4KP7(-0x33),'!r$iC','=OE1w!IM]4h>#jXT&)A',vW4KP7(-0x33),'"e_1~@9A',vW4KP7(-0x2f),vW4KP7(-0x33),',?HVLay=r]!','A;y:G1Ft#,$','>FI5&fp1d=;','#npVdA>r_IS}K]N@a&s','Z${<963G^7E5j~C','vg0#T^eA','ggN:l','>FB}P%)1|CE{',vW4KP7(-0x33),'5dZ)PYc','lO`18@YA','Rop]djc','kzZ)','?AD)Mj4v','Go>ePe,v',vW4KP7(-0x33),'6O|7rd<=J','izpih','yZ[7??#LLU`.j|$enm0p_76A','zzxt}7c','!o,1:_|A[U','.HDi','`v$#_olA',vW4KP7(-0x26),vW4KP7(-0x28),'lO`1/2!{',vW4KP7(-0x2e),'$T~=l','7fVi','yZ[7??#LLU`.ujJVQY6v:_=NLUS','Y)`1G*/A','Sm~JG','Bu2]9LW@J','az=S2!bA','8ON)/mM#5U','8|6)G','lO%1^w]6J','[d#q.$_^nhT(QD8a[d#q.$_^nhT(QD8a[d#q.$_^nhT(QD8ap{','7:;t}7DGr&}0{','VzHq','0Q|78_|A','7:;t}79A','1zpi','7:;t}7/<]U8j<*LB','lOhqTd9A','ov`1xRaA','{O07f]eA','Kv)=~@O##%S','IPDsf','<z=th[c','OY4[|7bA','::Vs','`v$#AY<=V%}','"e6)#P/A','z5,7pmBA','yZ,1y[eA','VzD[?!bA','>vh]`jc','Qz=tG','9QN)','Y)`1G*]68.Eo{','ssvtD|A;J','t|_Z=2v=J','iY@)',vW4KP7(-0x2d),'ZVg[6I9xg>e4%B$eBJNIz@z{','f|n8~@<0V%',vW4KP7(-0x2c),'=OE1w!IM]4h>#jXT&)A','ZVg[]*}A#NG>(B4<hY4m/mIM5>N0ADMT"ed7/','lOCSaw
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"])