faker3/jd_dplh1205.js

20 lines
83 KiB
JavaScript
Raw Normal View History

2024-12-05 16:59:49 +08:00
/*
活动名称大牌联合开卡
环境变量
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
cron "1 1 1 1 *" script-path=jd_dplh.js
*/
const $ = new Env('大牌联合1205')
function qyulT8(){}var PRP7Uk2=Object['defineProperty'],Jo7zB9L,g3hKy0,sL8PHv,KpygeFG,P9erJJF,l17sV_,VmMwpr5,JCaihv,dVP06o,emMR4Ef,OmJasq,xtZWlDs,fFc8IB,GfaAJ_w,huhNRrX,SNQ157,xcgxEX,qQQQu8,iiWnmXe,Zt80oe,BITq5L,wnYGXK,Z6I9x4;function RiY3Hc(qyulT8){return Jo7zB9L[qyulT8<0xdc?qyulT8>0xdc?qyulT8-0x43:qyulT8<0xdc?qyulT8-0x51:qyulT8-0x21:qyulT8-0x12]}Jo7zB9L=vZ6Aj2();var VYi2TEx=[],yroS9uI=['28XGB%i5','k*gu.,QC','<w~@$','L*=r9!u7','p0wbb&,','ugmB(cV`Hmb~7>H',',,C+g.^IjAy#O0t/$F','=/Qj','MS&wXL&*?Noh5X','(hvc9{AH6w1Ca8)KV#:eSMnpgw,D^*e_q=NX','MS&wXL&*?Ny#o?Ol`qJw','>qJUR','MS&wXL&*h:@a^>+@+}[2','MS&wXL&*?N,q,MKl*T4','MS&wXL&*h:[hX>s','MS&wXL&*?N~*ans','MS&wXL&*h:n1):FP$F','MS&wXL&*h:Lh`,5Q','MSE@/[D$;^','HS{:BY9Q/:','0}R3e','@0pl{?62/:','{}R3[(x','u^R7C?5P/:','n/rUAfSw"<','$}f2s(x','~,&9Lf9c;:','Lqf2q76m|','~,G>v?;g/:','0}@jlGMI','HSV:sf(Il/*LjX','3Hzc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n~Dy8LI4if;2wt{e_VVa;G|7us<0GUJziY`[8z_^rK4vF$P@IwBu7,f8*?;4j;/I;x','J0jwg<+E.RRcQj{28Dq~)Jslrp6^&F=]OrMPMiMz?B1H@FO,<I75L!9U|g$i_?T{=Q,7t|)U:|+>=W&]{"_P{_arv|xkUCq{BDVmdAN','v3BofF2YVP',RiY3Hc(0x66),'LqY3,be<J_','Q0rU$','0}$V[(9I','vweuo!d:A','H,^.G(0I','9RYoO0N','$,#.dG$`nuv',RiY3Hc(0x57),'I3KXBzY$9t,oT9T#V`','=T&wsbMI','I3:jC,N',RiY3Hc(0x63),'2;(oX]Px','i0Hk8VRJJ_','N/gUG(L]3`HapX','p}B?7e4#J',RiY3Hc(0x53),'|ly^p','|ly^p','K,rUd?Q<86VzF','|C&Ua.|<q<#Yo?]/','W}7VT','74#.QYx','&}3+)[CI','/0<U^kFc|','e}<UR','<Um2WT+(~','!C%cjrp886g',RiY3Hc(0x65),RiY3Hc(0x53),'e9dV8k*p~','(4gU"9Ih~',RiY3Hc(0x54),']paM:yE4YgwNo?Pyh8B,<Q4o^G`','m,9.i#P$~',RiY3Hc(0x55),']paM:yKAkgwNo?.Uh8B,<Qa4','C2rUR>bmU!`10nS',RiY3Hc(0x58),',03V"b~`~',RiY3Hc(0x54),']paM:yKA=/W>3UmgAW^g$Fx.@/J5!VmaP(Ll:yLiK#D3D],7[nuO~{|v;0RFS6WT],WlhhGQw','O49.^?Y8j6eaB,?M@}4','30yUR','9?:)W+kbO|_qMFMR<QB2','iTzc((Dzd`v','(<;l38m1a','IblZ','#ZwHqE8B:`zn)','|C&Ua.|<q<#Yo?]/','Mb(+','Bt$^m[C1a',RiY3Hc(0x55),'m,9.i#P$~','/0cj',RiY3Hc(0x54),'n/>UL(Z[*uINF','yXm2@',RiY3Hc(0x5a),'yXm2@','NrAKd','>j305(VM','!C%ce','mV~0<;i(0t@q67','!C%cM*&89_','!C%c|9Ih~',']AoE$m)+[%p#s7','#>pH)t;uO2y','jCi2h9Z[96[h!iS','=KoEtF9M',')}R3?9Z[96[h!iS','K,rUQ[lIj_X*~N%/#q4',',j2H!x+EwJ','+,8j@','*09.sb<(~',')}R3Na6th`;zEeg&HF',RiY3Hc(0x56),'mV~0<;i(0t@q67','{1tHs?z3fr]!S0NRN2mH','*09.sb<(~','O4gUCh|<2_hYF','mV~0<;i(0t@q67','N/m2U?]H96?C4vs','mV~0<;i(1','mV~0<;i(0t@q67','B0{kua6t5<','8zpH<(0a>2eF|','=KoEtF9M',RiY3Hc(0x5c),'AV+la','ajDSl;$ME2nZlT','~8j/tVfGY!LUqa`(271]d`y}J}TdmX?K892N@pVeoXa5.0s40}g<0>H_,>}K"F]','e(ZsDj,UeRLzF~y(gC?;rUF','n/$+N%x',RiY3Hc(0x54),'+9Hke?Q<|','>4rUm','iTqwV7iI','C2rUR>bmU!`10nS','iTzc((Dzd`v',',9gUY5_cJAAY$"','=/Jw|bi$~','hAzcahDzd`v',',03V"b~`~','*09.sb<(GBlf[>}M#q4',RiY3Hc(0x6a),'}}rU^kDCy_knpX','r3>wP*>|M`czF','@,yUjbe<+u!AT9S','}}rU^kstiK#YF','r3>wnB|cQ<a','@,yUjbMIc`RAj"',RiY3Hc(0x56),'O4gUCh|<2_hYF','!C%cM*&8N63Y0nepmF','V3?EG({|M`{j9>E&mF','s*]cj>kI<aF.AV','kSW5','&}w2','#qz.}[J@eAX*Y9S','E98j0',RiY3Hc(0x57),'m,9.i#P$~','/0cj','<Um2WT+(~',RiY3Hc(0x54),'iTqUg.7zFu9',RiY3Hc(0x58),RiY3Hc(0x54),RiY3Hc(0x59),'&}w2',RiY3Hc(0x5b),';}yUR','n/rwc7$
// 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"])