faker3/jd_pointExgBeans.js

20 lines
98 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称积分兑换京豆 · 超级会员
活动链接https://cjhy-isv.isvjcloud.com/mc/wxPointShopView/pointExgBeans?venderId=<店铺id>&giftId=<活动id>
2024-08-13 10:55:36 +08:00
环境变量
jd_pointExgBeans_activityUrl // 活动链接
jd_pointExgBeans_threads // 控制并发线程数正整数默认1最大5
jd_pointExgBeans_interval // 自定义运行间隔时长整数单位毫秒默认1000
jd_pointExgBeans_notify // 是否推送通知true/false默认不推送
jd_pointExgBeans_pinFilter // 账号pin过滤多个用@进行分割
jd_pointExgBeans_hotbreak // IP限制后继续执行true/false默认false
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 ggsElv(){}var PS61TpK=Object['defineProperty'],x_bH3Yz,GrpZibt,OwV16f,M5keu5,Oq0dTH,ouuCvv,uXYt_pD,R7RnF5a,GcgkVEl,VP6eB9,aNOF0DM,DtFupd,mN4Mus,mssQq9S,ucZMBQ,ms5Rkn7,c2sxMYU;function b2YUfe(ggsElv){return x_bH3Yz[ggsElv<0x30?ggsElv-0x5e:ggsElv>0x119?ggsElv-0x50:ggsElv-0x31]}x_bH3Yz=UehMhMQ.call(this);function nS3LeN(ggsElv,PS61TpK){GrpZibt(ggsElv,'length',{value:PS61TpK,configurable:b2YUfe(0x68)});return ggsElv}GrpZibt=Object.defineProperty;var XPU2Of=[],MrnEyjO=['t]|SGI<g','xh~^/%0X','_!.S/HcX','%kjOl_oos','ZNBPKL]X','z~fR,Z9T9?3rhS','tU2nw','0k?6_7cc:#q','w8DN11ByeQY5%,','%&/;L','q}urc$^S','=/ZAU(BS','n},V','8"GAh','/d1B5','#C947:jX',b2YUfe(0x32),'gLdvv^u','j2<xp=[}M<v1X]M','CCc$E49Xg<pn3j~R}s','6+FDcnlIKV0H0w]6','8RTg','wM6F;7A:2<WyL506JR+42nGI|e."Dht}s6d','wM6F;7SX','2PBb?_Js','ld94p,{X','^ow$x?1X','ld94p,SX','2Pl@5mMX','{8OLM','wM6F;7A:2<WyL506JR+4(4~I|e,>s','wM6F;7A:2<WyL506JR+4g0~I|e,>s','mo&v*','wM6F;7A:2<WyL506JR+4XyA:6PQG;]9R','*cdvy:u','wM6F;7A:2<WyL506JR+4[K~ISV]HdwW','zCV7S','sL>B','Rj1Bv^cX','ExFB','XLpv*','8X<PhpoQkS#{mh^:PraQkt>m*4vz;RpfCv?$*','PnIB.','j2<xp=IX','xjOg}^u','XLpv*','eC,vz^TZWG0Hs',b2YUfe(0x35),'/dn4TKu','62x$D>cX','RjZv9Ns@A','52Zv*',b2YUfe(0x31),'P&gYOKz2[iqp046xN_0;i!~%v=o0=oT:)2e<{XRq&^ppHG~{PCD;1KZL/i)VO0}x5:CC','LLH4$^ys',b2YUfe(0x31),'P&gYOKz2[iD]04q@1XFf&Qm[@&n0P=Q:~MLUu!NmB.','eC,vT>;X','adovlN9X','[pRA',',yGWUslJ','<pwW+SF18e','$2WgG4*&&V',b2YUfe(0x33),'9.G$}','}=Jxj','}=Jxi$VZ&9lP@_fT!RON3Nu',b2YUfe(0x31),'P&gYOKz2[iD]04q@1XFf&Qm[@&n0P=Q:~Ma3IV%!O*',']ywW',b2YUfe(0x38),'%QM1~]=N?`i@D','62FB','8(AOu@aXmhH{/u~Hd&|j}Qk1wyUb7sY4_9C)|2$^H6t!:l<MeN&0)','E)BW','JCZL5','ZCNW#X+J','lpuA#$,]<k%@yo/,ND','D2*x5',b2YUfe(0x34),'y)V}[XDI4l','}+Zv{4eX','5p^B=8<(t','A9~?a6Twt','Vp;s8Pu]Y','QpV}64yJ','K(0kZ"<<~4','lpxLaSHJ','YC%[5','.C>B%nS}b','qtUWizu',b2YUfe(0x31),'}+Zv{4eX','eCn4z7RX','8jl@Jn;X','8P6FY=wX','I^/@ulueA','row$4:9X',b2YUfe(0x32),b2YUfe(0x33),'|R,F@/eX','x#H@f%~ING8Ks',b2YUfe(0x36),'9,`CkvH26D9PNJ&:_O33?p,g,)t3nG!1tIm+!^|Qp','62FB','eC,vo4;X','|RfNz7wX','$C`B.',b2YUfe(0x34),b2YUfe(0x35),'eCOg*7/Hw`xKj|5JIs','*2_B}^/>b','x#H@f%RX','CCnt.','62FB','Rj@g','="YThp_T`j}x@bV','*CmF~P9X','[2mv[%RX','Cv?$(owX','CC@g',b2YUfe(0x35),'eCZv~8u','62FB','4~GR','9.G$}','|RIB@(A:4EF]U^W','62FB','eC,vSi[Hw`o','62FB','62FB',b2YUfe(0x37),'cBz$Y:L?H`o','}Cdv/)KW=GO<@_pfaBX','Pn0NK:h?&V','cBz0x/c}b','j+(B',',xmFM0<&b','/dZv@l?I1a"Hs','xjpv*','+^hDq$N=3AVowsw*ZT(B','5cl.~N9X','52c0;EJ&&V',b2YUfe(0x31),'JjuBh0*&&V','27/wqv1${nzx,SB:EctUmgs','K"&E#bL|:#qHV}6>v5GQ.MZ7HSK}sZ_%Hs','Ac6v"4AZoZnKU^iR','JjuBh0MX','T28g','Rj@g','52c0;ESX',b2YUfe(0x36),'62FB','Rj@g',b2YUfe(0x31),'eCz0Q/_}g9{rW_iRIs','?ooFS^u',b2YUfe(0x31),'Y+hDJ>Y~1enKbt','62FB','f2*x>:As','>;S42>u','0RmFz^xX','q<_Bz^xX','^#ovS^K.&<RGs','.2}0)@q6NVx',b2YUfe(0x31),b2YUfe(0x31),'PnBxZ^MX','Rj@g',b2YUfe(0x31),'WCH@h:K.&<RGr:jJ2Pd','/dZv@l%W.O!H:LbI[^d','/dZv@l%W}r@|Dh"JwP]g',b2YUfe(0x31),b2YUfe(0x31),'%j`B','>;S42>u',b2YUfe(0x3b),'_8Fx','Rj@g',b2YUfe(0x31),'1aAw','Y+hDJ>)s','YLbwni4','62FB',b2YUfe(0x37),b2YUfe(0x38),'eC,vSi)s',b2YUfe(0x3c),'.CEv*N{X',b2YUfe(0x3d),'}Cn@$^{X%e0','1j#NE4*&&V',b2YUfe(0x39),b2YUfe(0x3a),b2YUfe(0x31),b2YUfe(0x31),'^880W','|RIB@(A:4EF]U^W',b2YUfe(0x39),'q0"YLX,1+zdPe3h',b2YUfe(0x3a),b2YUfe(0x31),b2YUfe(0x31),'r$D}.','}Cdv/)KW=GO<@_pfaBX','62FB','|REvJ>{X','eC,vD>/~p<Y_|L','62FB','5:8T&Q3}1=)','X?3;*v!$@5l','<!KPaY.vn}?','@h.TnX<1EK0"]=`>QaL','Fls[{IU*%4dP_Jz','<!w"(ZBv+zds','62FB',b2YUfe(0x3b),'eC,vD>cX','7o.=n_u',b2YUfe(0x31),'eCz0Q/_}g9{rW_iRIs',b2YUfe(0x31),'IC+41n[}b','A2.AO','3FN4::@&&V,r_+lRh^H.E4IX','22~$"4u',')o5v;E+XNV','r8tA','|.ie&6(R','(x|v1q9K',b2YUfe(0x3c),'E+Ga','P>2EJJTR','ICH4UKwX','wPH.E44s','Cvl@5','Xp|v]YZwQ^S6K','yhqZ?#<t)','[~$4q9nR','DC`BS^W@PV','Q@wp]','(x0vdLZw)','Nn@grlE%hOfyjtDQNn@grlE%hOfyjtDQNn@grlE%hOfyjtDQ.s','E%sgzE?R','*f:v]','T28g','Uf@EQ&@R','v~5a','4;?$"4S[=VD_[m&w','(x3D}AN$fn8Rq8W$A6&vvmyR',']xB}J>C@@Z0','=b;8+','W~$g32B','CcGN+4O%?A*',',xl@XcIX','"T3D','nVPbz','rTwpebaJE&>{VFl','P>jvP2TR','T2tN:)9X','H.3Z|_B','j2}$*','{j`B','88.g;@Rs)','$+EF}ix}b','Ac>B','Xp*g+J8sUI6','!vC)n','
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"])