mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
24 lines
77 KiB
JavaScript
24 lines
77 KiB
JavaScript
|
/*
|
|||
|
活动名称:入会礼包
|
|||
|
活动链接:https://shopmember.m.jd.com/shopcard/?venderId=<商家ID>
|
|||
|
环境变量:jd_opencard_venderId // 商家ID,多个用英文逗号分割
|
|||
|
jd_opencard_min_beans // 最低豆子入会阈值(整数),默认10,奖品数量大于或等于此值时才会入会,填0表示不限制
|
|||
|
jd_opencard_task_threads // 控制店铺并发线程数(正整数),默认1,最大3
|
|||
|
jd_opencard_account_threads // 控制账号并发线程数(正整数),默认1,最大3
|
|||
|
jd_opencard_account_interval // 自定义运行间隔时长(整数,单位毫秒),默认0
|
|||
|
jd_opencard_notify // 是否推送中奖信息(true/false),默认不推送
|
|||
|
|
|||
|
目前官方设置的入会礼包奖品只有优惠券、京豆、店铺积分、红包
|
|||
|
黑号或新注册的账号可能会一直403
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('入会礼包')
|
|||
|
|
|||
|
function qiMleV(){}var V5xkfB=Object['defineProperty'],sDJbow,UqQ5lK,TVnwe5,wkzYP4,JU0Z7Lw,og7Wib,nUQRTLr,A3YzK6x,L0IvcB,ku0mkb,xQgylE,jSNdjtb,X1J3WuJ,nKDl6b,Z5lfFS,Tj8P9SX,iAgTgI,YoZNjqm;function YS944ZQ(qiMleV){return sDJbow[qiMleV<0x41?qiMleV+0x5f:qiMleV+0x40]}sDJbow=WiXkFT9();function _lw0TZ(qiMleV,V5xkfB){return UqQ5lK(qiMleV,YS944ZQ(-0x53),{value:V5xkfB,configurable:!0x0})}UqQ5lK=Object.defineProperty;var _FWw2j=[],cNiAh_s=['oQk;Jf;;=','V,S!2$Wy','o]u<4.uy','DP[7x~My','8q}PJ/:D:7k|nV','bl|>2','[@5<Yj!!=F{','2Zg(??rVHLGdJE','Jq6KR','*A)|P;/d','Up&TWx?d','8Ac^','m*lNd0Vd','"NgnS','qoX[W','/%5+p_g(','0/uC(Z$(','a1`7+_5(','RHbKl','&i{K','`cqz:R5(','H[uCyV}(','=%s[tYZ(','IZoTR_2','`cqz:RPj@wpV6#9`>iECWYqjg5','`cqz:RPj@wpV6##ix0)]]_>"+w%1:d','`cqz:RPj@wpV6#nvX[WTw+NN95qVs%WQ.8','`cqz:RPj@wpV6#nvX[WTw+NNxUDG)gH9zvo','{SAT(?*(','#1zTI','e%;pt','8fj[','igX[TYZ(','H0}[','(fbTI','&(3m6b14Pt/$#6Y_mah4Pdj#I+Tevibk%TV7I','mD.[l','gS30bL.(','0gnKFY2','(fbTI',YS944ZQ(-0x5c),'0/uC(Z$(',YS944ZQ(-0x5f),'mzK|nGeSE!,b<+Q0]?<v!@NxTL1<L1{_rSU3$(i,zYbbuwN$m%=vXGMfq!r;n<F0W_wq+4+(','bf.[EH9zz;','QS}[','mzK|nGeHviX{WnkXr,3c+/aCsg*yL1J_$hfS3@j#Xp:)OU=u;.,qS','xgs[','V/t+CB"C{MW"{f','V/t+CBZ(','>iATXV2','gS5+7H8M_U','bf.[l','U%ATeY{M"w<u8',YS944ZQ(-0x59),YS944ZQ(-0x5f),'qoD+{G2','QS07=jZ(','igMT5]8CJ','WSMTI','0gnKFY2','gSt+cL5(','.%*+XDEF:','U%nK','FEp#T?:T','%n*z>oYTtsvpP&%4?I<xD@YT','IS?[FYqj:',YS944ZQ(-0x5f),'H8"w_SjT','tVGF(u0','KH;w<rgG>%9p(bJ+EL','QS}[',YS944ZQ(-0x5f),'7*/]WY{MJ','l%HTI]$(','<0r$@jVuJ','aFZ#Jx&T','nZOC`xQ"^w0Gg>W9.8','bYa7R!wWfed3n:v+.Hs|5','bYa7R!wWfeHs>@n]','Z[ATI#L.=ao18','>iAT9j5(','"C.P?)4T','RvV]__2','XmHT1+e(','Z[ATI#L.TnyjU^c','R1I0=Y@uYs$','t*"Kg','&Hvz_(Nu8eFo3jk&IL','tvCy^G;d',YS944ZQ(-0x5d),YS944ZQ(-0x5e),':Dm|IPIT','$odKaCi(','~E@w<F>k^$!~W.VY&H;FN(0','V/?[405(','z:OCkxc(','?I<xD@YT','AQV"','4hMW','QS}[','>n;w^S+WwXGxq.<&|L',YS944ZQ(-0x5f),'+8Bw','Xm1TH+qu8h*','J_hKsi~N=z/`05]!Wk$<3XO:&~5nLO','5nJ73y:T','9g2[*16ECM','9g2[*1`(','RH0w~#^T','c)>+DQpWQ/}','^vs|H','fAg^[=},','LYV@bxa8.E+X>$iL1O',YS944ZQ(-0x5e),'&Hvz_(pT',YS944ZQ(-0x5d),YS944ZQ(-0x5c),YS944ZQ(-0x5b),'=SI0W',YS944ZQ(-0x5b),YS944ZQ(-0x5b),'@`0]vOyN}^@P<]<u4%m{6BL','D@*#rte7SIzu;wV_2^f','+8Bw',YS944ZQ(-0x5f),YS944ZQ(-0x5f),YS944ZQ(-0x5b),'KH;w<rgG>%9p(bJ+EL','9w]J5','LV?D[:.Gc','bYJ7R!:T',YS944ZQ(-0x5b),'EV%Be','bVfr','+8Bw','7VIrO*F#5vlBpg','QS}[','1C{|XurcM#i*s@+&`^y#*2#kN#]$uvg&vYmyzu;d1W','O85O{','JZQTXV2','/3nfsE2','O?+7h~0','~E@wtyVT','kAZ#UaKT','j5Ny!2YT','%vVzzu;d&;DxL','+vV7y+tEL;=?E#z`','LY&b!>0','z4~N`z:T','38_N_','=%s[tY"Cm;','iij>0=y?#Wh','5vZ#1cuL','D1HTTp`(',':/xH/7wL','3n[BJ`VT','nvx7=uvT','KHG>"~0','0/uC*+Ar:','U%nKS{oIJ','ff1TO]oI[;dx8','U%D+=Gi(','kSvTy+S8','s1F71+e(','J%~s*[4<lFMJPQ{4oYh<biLN','U*5++_t(','PYRA3','LD>s|kS:4?rTi"u_%C','Egs[hZ`EL;WyD%a/ScOC"]x9:','1Rz;RpFbI/B^AkSosC','j]:sV+}C','<H"w?b4T','?wa73[gG>QDxL','z.1O','`cqz9Gi(','2*XV9[UN','D}$sb+F:T!NzXa','$!]Vug:N','m?kX','?wa73[gG>QDxL','Z[ATI#L.TnyjU^c','4Q:sw','cD!f>k2','=z,zO^x','{S&K',';x&NG','>s]Vl+oN','.]Nak1W2aX&','9FJ7Q@&T','rzuVZ~oN','Zx"w','Gn{|7(%T',')R]Hl+_)c','|[e7fR$(','v<;D','x.Wz_(%T','"2Hs','IL.[/7M/z;9wg>^QZPLg|','Us#;K^3<L6q/,Q:A?Rm','+/ZYo<nmvh&b?YCiSXEd@T/8','f]+[ISoN','{mnK;_^!g}oxG*uiyt]CDrCz:','~|Z79jS"J','1C{|XurcHBD9ovpY`^y#*2#k_B','GU#;V"Z:W5^3%uT2wC','F(Mso9x','GU#;V"Z:W5^3Uhl_XC','D}Tgl','c<;w7S&T','g(h1s^`N','JZj["LGJS3waB#/4U38p~7yNb3_hHWc`&i/]mVa.:','Q0OC)7Liz;DG8','9|lgYS`N','ff1TO]X(','#oAT.','zDIV;icwc','1R}VV+mwc','7*/]WY{MJ','D1u+Sj2',YS944ZQ(-0x5f),'&Q#7B[rPO','U%D+epi(','&gOC9Dv(','&mQ}|L`(','V/t+CB"C{MW"{f','U%nKIpqu`s0Gg>W9.8','IS?[FYqj:','QS}[','igCK','Ly|{6b?{sgF0C:;','U%MTN&2','gSt+cL5(','>iF7^O2','0gnKFY2','.%*+XDEF:','/%5+p_g(',YS944ZQ(-0x5a),'xgs[',YS944ZQ(-0x5c),YS944ZQ(-0x5a),YS944ZQ(-0x59),'zvX[','d>D7|_h8','mDQT4j5(','*&1}4GA!(','0/uC(Z$(','&:p7qr$(','R1t+WY{MJ','*oj[',',|nK','gS5+vpZF:','ffu+7Yvj45','*onKg','T11T=!2','.0,1M','1oATI','%%/]mVTF@HBf|^Xk<iOCj_2','x1WT"L*F:','F%AT1+wFK5:xrf','+v`7ijvjS3jV96K`','_vG0@Dv(','GH80tYZ(','l%ST%LyF:','mDE+SjkMJ','ESF7I]5(','/~l74jf}es$','/~&7e]Pjcwyu8','_vG0@Dj.Tht?8','ffu+7Ydr0
|
|||
|
|
|||
|
// 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"])
|