mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
21 lines
119 KiB
JavaScript
21 lines
119 KiB
JavaScript
|
/*
|
|||
|
活动名称:大牌联合(开卡)
|
|||
|
环境变量:
|
|||
|
jd_dplh_viewShop // 是否(true/false)做浏览任务,默认不做
|
|||
|
jd_dplh_addCart // 是否(true/false)做加购任务,默认不做
|
|||
|
jd_dplh_draw // 抽奖次数,变量暂时无效
|
|||
|
jd_dplh_blacklist // 黑名单 用&隔开 pin值
|
|||
|
jd_dplh_Notify // 是否通知(true/false),默认不通知
|
|||
|
jd_dplh_break // IP限制后继续执行(true/false)
|
|||
|
|
|||
|
实物奖品需要填写地址变量才行,具体请查看 WIki
|
|||
|
|
|||
|
cron "1 1 1 1 *" script-path=jd_dplh.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('大牌联合0809')
|
|||
|
function _sSvLAS(){}var wJvsdO=Object['defineProperty'],ThAQ5w,uGVEXi,p84aW91,CY6dod,Dsw82Q,GzXHi4n,MpgEzc,FByg9ww,gFrg58w,ZY7jUR,Z0HdnjE,O314z9v,Ku9ljvH,vMS_Jrc,jcWKLlR,s1yW59a,xDUCNL,lhrOimQ,FEHyBU;function AnIm_Qc(_sSvLAS){return ThAQ5w[_sSvLAS<0x4?_sSvLAS-0x18:_sSvLAS<0x4?_sSvLAS+0x36:_sSvLAS-0x5]}ThAQ5w=jE7I2wr.call(this);function lPngco(_sSvLAS,wJvsdO){var p84aW91=zDuWh07(_sSvLAS=>{return ThAQ5w[_sSvLAS<0x5?_sSvLAS+0x29:_sSvLAS-0x6]},0x1);uGVEXi(_sSvLAS,p84aW91(0x2e),{value:wJvsdO,configurable:AnIm_Qc(0x5f)});return _sSvLAS}uGVEXi=Object.defineProperty;var wpA3Lu=[],L6oHjp3=['05lIMN[FJ','V>_pApOo','a>n2G35o','c#uKv1$Zh','F,.rhR2E','[1=8ngb9','""zp1EY','+ph9(',',6Uyf}ll:J*','(?oYMM&aZ{.IdX','dSbT^','N21!}rut','.NVgLO:&iq7*,','f/D(,XBr6J[','Bg"z^',',9QAL',AnIm_Qc(0xb),'(P65lNdy','G89``Vu','d"R2pEkc=R`QyF=','PPzbB56yGRpT^d7tcw','1t)G','S=n?8[n]VFW4#8','wr2;:T^X62|#BP`<Ch=bN#scs@s[q]~n}Ti0Sn!waAtau','S=n?8[Yy','`WVAbVSy',',9}Gi','>m.`i','`W,`3Vhy','S(0As','S=n?8[n]VFPmPS<Y]Z9','S=n?8[n]4Ia48>U','S=n?8[n]VFv]j;U','S=n?8[n]4I;e:Iwkcw','S=n?8[n]4I[4_P#)','S=s3ta`y','(=fIhCH)tI','d"i2L','3d+YfV@AtI','f"i2aNu','r6i,zV#ktI',';tJ`R0=?}q','c"0AUNu','vPnH[0H*$I','[m0Am,@&D','vPl>{V$BtI','d"3GYlSy','(=xIU0NyYt][G8','2(/*g#6y','aX_)I0d9"I','vPOYa0)$tI','KPXls','w8aA','tdQA`Vzy',AnIm_Qc(0x11),AnIm_Qc(0x5),'N@M}5$YCsE[2r5Rb}"fCsxkrQD#Z!9$3c#`WQ','}&v{X','MYDM].w*d6j','S=n?8[n]4If@9S#)zd!G3','NUr/5Q5w}','R2FbpSM<8','GP#Ez.(w}','Tmm`?N&y]<x','Tm/5Oloa%@l4)8',AnIm_Qc(0x9),AnIm_Qc(0x5),'<P|Gka+]:e2Cd;L+&w','Z.GU|CK"k~Opx5n2M0A=','eOTp:L|$|L*x8~#a6Gr^&Xw','(Kpnap&beT9Zf?VNQnt6B<w','SXx?:ZbL8[yBemCDRonHy8`f&xm%P553?fn:C&~~<~t',AnIm_Qc(0x6),'qAH=WmP)%8oKw?5h:bc=u8Ze~3i<QZmJ`_do6b8OdR}ws[KnYu','7px?&1k~B~<0u','(P65lNdy','[nnB:nBu','7px?&1f`','Ld{|z','qAH=WmP)%8oKw?5hRcq3u8Ze~3!Xh*>cFum(ZRx1Xl"r=$GUq,YXDFgi98m^d+','zAJ`i>E&:e04#8','zAJ`i>sy','xV]/&Mu',';tJ?*,ccd6','zAJ`Q4bw','f:]&zI$_3%!Bu','<PJ`)aYyGX8]vFgtTm9','f:]&nl+','f:]&zI$_3%!Bu','|T7?[jz..D',';RijoFi`',',6[MJ[ou','x2SxWCQy','f3J?:l/y','%t|M^Mu',AnIm_Qc(0x8),'f:]&zI$_3%!Bu','Z.GU|CK"k~:Fx5O*Qy?f.$>k*.TxZE$N7=r^&X]%|i','RTo<>$_`','2d|GcVu','J2g*Bm<y','{1>dKt$tB?',';t>`[Noa]ryFw','!H|G`lzy','~$cbi','TYJ{+nYwMXAHu',AnIm_Qc(0x7),'PPT}3',AnIm_Qc(0x21),'v8_A=xR.v','J9NjTJ+','v8_Ablky','(P65lNdy','6r&wL4F(n88VC&@%o;]k"6_TxHA<v$y','EjK)36w`#Lbm@qANh"A6L+ex.5_~IvlFwy',':bVcK"|R=1Vt56;>7^`!)','g+RkbwZ$kc{m]_+N=&GR`G}{HT>!G_OZrw','`lupg#`5$K(0c6lJ%uvxiux+','6r&wL4F(n88VC&@%o;]k"6_TxHA<v$.cPxv','dNySy|ciTlc2"gGNQaX6vpXl5VjtH<:/X&O,"','=c}9A>X=&RtBkQlc`I:iHZ%t.jQLaNu','3PKbpEecG6',']"4<{m+','^B4<,$H~.D',')dJ`c','RT{tJcp`','EwKU|mS~/','(P65lNdy','58{|Pr+','cPT5Klty','hRI)','4$Hf.wd5','<PT5Klc_;r1bd;d+Gw','hXk)#$W`','M,~&*h+',',.("yToCp','%BW|jci`','Qd(M!xi..X','nR"K7tw`','k<rU,tz..D','FtB`lN[~2_(j+8','LHKx!M]+v','C(@e<"85','_zRL{','YB0jO1i`','BA/*j4u','3Tz<H','<PJ`KVQy','D82bi','Dzn`j5DqmqTCWV~t','xV+vi','sH!Gd',',9T5)Cu','n"2b:azy','tdq`6Mw*D','^9H5,>SyGRpT^d7tcw','^9H5,>SyGRpT^d7tcw',AnIm_Qc(0x6),'^9H5,>Sy',']m0AbVzy',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|
|||
|
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"])
|