faker3/jd_dplh0815.js

21 lines
107 KiB
JavaScript
Raw Normal View History

2024-08-15 13:13:18 +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
实物奖品需要填写地址变量才行具体请查看 WIki
cron "1 1 1 1 *" script-path=jd_dplh.js
*/
const $ = new Env('大牌联合0815')
function S3lniDG(){}var qf6ous=Object['defineProperty'],Z81Q8v,KaUTkK,WYCefZn,Cz6abf,URg3fWM,XBcZtVt,Fukmbe,Xb8YpOW,U3B5vq,HlnojZQ,ipb1LR,MbYxR7,zzY3nA,DO99A5,G8OQva_,FN2I0f,SRrC6K,SPoHvf;function gIj7_71(S3lniDG){return Z81Q8v[S3lniDG<-0xe?S3lniDG-0x3:S3lniDG>0xea?S3lniDG+0x20:S3lniDG+0xd]}Z81Q8v=aIFQuSI.call(this);function MkmkYQ(S3lniDG,qf6ous){var WYCefZn=LhziDI(S3lniDG=>{return Z81Q8v[S3lniDG>-0x32?S3lniDG+0x31:S3lniDG-0x49]},0x1);return KaUTkK(S3lniDG,WYCefZn(-0x19),{value:qf6ous,configurable:!0x0})}KaUTkK=Object.defineProperty;var gqpYJT_=[],gb5kgq=['kmc/|?VL','amS2S<]qJ','C*F5"z+u+%L&pA','R_~Bo','T]puC/>>U+;','oHXhqqxEM,!z<|','<?@1#','@L9zt7CG','/})Odbf7R8c','{gJpl','8T%bf','_sD2(.)W','prQX','YHxdn|x+:]*o/n','o@%fFxqx?Rre`n9GtyqUYxPq.y,,~','YHxdn|x+:]a[*:4Izt#d','1t#9O','YHxdn|x+olk"D1NkN?^b','YHxdn|x+:]stsYGI+;T','YHxdn|IW','9*#S%[JW','YHxdn|x+:]E+"VZ','YHxdn|x+olVc3lq`iq','9*!SN:HW','YHFkr^6iBD','_HClJegQrl',')?Oyf','k)uIC:Kbrl','C?Oy^.~','7DO8M:/`rl','Vr59@UHdjm','i?UbZ.~','Esxg|UgSBl','|tUbt8K0h','Es(1}:B!rl',')?kXI(YW','_HvlZU.WIr+|Xn','y_LS</DW','^RzQlU)T?l','8TjXO','Es&I^UQBrl','>sR(F','qn^b','r)%b9:MW',gIj7_71(-0x3),gIj7_71(0x2),'pW@;latB{F_}1l:.;c7B{j^1O29>IraCs9oNO',';[0bk','AIhA+#qS)D"','YHxdn|x+olCKTY/QM)PXk','[tt9d.0W+Gv','[tL2&({^6K(oQn','x?db','Wna9O','GswX`^u+3cye)Vfu0q',';#XZwe>?`$&av2xyAUvI$6=+9,tv,tQ./?G@}Wr&#:aaLK=};s3I%emn8$/Rwviyf.ss','Q;wXbuC$rK>t*:"R)@%f>rWM9w:c]VV3XM%b"9mmymv','{lf`Y:]dcr@AHXVpbC.`qru*m3Dyzu:^W0B@ECr&B)+HJKA%[q','PgwX9(xmtmyLq','cO}<@mkU','Klg#r]_)k)X%L','{lf`Y:]dcr@AHXVp).6a','S#t,<(vMz`=/V6TmWOn(0iB','b]2QHMV+A"vX3<>z.RyJ','3v?E9,W;Z:]#+A','5x?HrKVU','3v?EM#7B','Mb59O1FW',gIj7_71(-0xd),'VO?EjhoU1$A{w8!xt_S','3v?EM#|','Mb59O1,03cTtq','3v?E9,*U','Xe{4;D|','N?PXK2O##R','6)D2@U{^lG,V>]&`Z7S)s.("?Rzcs}Fl)?Jb','mS>ETNU#w','70I1a<iU','Mb59O1FW',gIj7_71(-0xd),';#XZwe>?`$3]v2&S%WdC#B1`S#[v;,B.=H740R+6wO','k0q/^W;U','/kb1Ye|',gIj7_71(0x7),'}p1)>rBr!d','5x,Enm)h{QU8B','INb1E@F._./4B',gIj7_71(-0x1),'P%DW}','0thY|MtiVCsGB','93SEnm|',gIj7_71(0x1),'^IF2?^~','wA2v7@JU','_sD2(.)W','w!Eiz~]lMxxK"E>:qR?Fcw;0bGs/TW`m8b$}$o$@Xdn&gW8usI;8p])>I(,$)Pr2vyKmDc7kJ@KX5wR^InUSM](vHpyG$XX"(@6KQ%.k@E`4M~2hI4$}?VS[BYJLUHgQKO]I{e(S1(xU(|','E<9H$eU4%rr8"9!c@65x_E0?wflyj,#.]wRDRIR(v>|&J,]peGPZ}:V*3$zIbv)!#"pP73_*m3UL#Fj.!MbD!b{wk3W^*=5!>6XCQh~','ks>Na,ciXD','?c~/Ye|',gIj7_71(0x6),'bfW3d','k0YXhmNU','LiDr7ej.6','_sD2(.)W','6FTu0`y','TBLaA5F1','uk,H','xy<SsvO##R','VOt<d@xU','uk!r=toU','mgO=)]I1','Gsm9=p~',gIj7_71(-0xa),'EDIua@X1','F/!rOXiU','%)_APvHW','Pbdp/{?iiG',']r!9(.|$yz_"un','fg>vPA+uE','igm9}2GW',gIj7_71(-0xc),gIj7_71(-0xc),'Gs59>:QmPKvLq','hMx9"2GW','z(2vEefU',gIj7_71(-0xb),'*NI1k','8T[2Qe~','x?yN3^MW','r)m9DAqSh','f?m9O','m90b&;N.E','wM<SX5uPPK!','YH$,}#{^E','igm9}2GW','fg>vPA+uE','.T!9jgWoE','x?db','$u"YlaFTe!d]*:`aoPJsmQT*D(z','0sg2%[`iE','r)SX','$u"YlaG@A!d]*:29oPJsmQ"T','Mb59O1FW','v:n2+[GW',gIj7_71(-0x4),'s)yvj,EzE','x?db','$u"YlaG@pr&1y90!@&D!iq~2kr#/wv0"`.|Ila|%G[6y6$s8^V74ECh}B)OqHK&;$s&Ioo(Qd','4Tg2D:ePXKf"Js:Yk?T','y)a9O','g:l3&NA,4hRtYqYOmQJb','%;LS..6L>z}','pr#dh,%iE',gIj7_71(-0x8),gIj7_71(-0xb),'hMx9"2hmtm[e*:$r','Q?pX',gIj7_71(-0xa),gIj7_71(-0x9),'0sg2%[`iE',gIj7_71(-0x9),gIj7_71(-0x8),gIj7_71(0x4),'an0bk','o_Ub/SRm?D','o_Ub/SFW','ydNBT','z%MXw','WJ@!69&A','wM<Sf',gIj7_71(-0x6),'wM<SY+xPgR','z%MXb^A=U','wM<SY+xP]KUo/n','o_Ubx!FW','i]+S','=W,B]ekNbDs','XM%bogDW','#_MXeLCA','arMXeLCA','3?Oy:g{^gK^ow%H','CJaO?o)AZRdvUnMj5Li','$JDBF"%A','NsPXk','$~/r"^@A',gIj7_71(0xa),gIj7_71(-0x7),'$~/rnp*:=D#YFwe]WG','Z%uB=^;o^*o=zu_',gIj7_71(-0x5),'WJaS.p&A','+)g2Z,m.2!l[un','njNBO"74I0pY)EcTc~oB',gIj7_71(-0x7),'4T!9MohmbRoeq',gIj7_71(-0x6),'njNBO"}G','O_}FjosA','+)g2Z,m.E',gIj7_71(-0x6),'J)CA7"K=/m','i?UbZ.@q','6?[U/','arMXeLCA','v&^!Vk09U','%&QZT','y_LSC+=0AKpeq','ksa9X,YW','b~/ro9f','TJyOZk(AXD/PZI','^mJ}e&jc;FtY5TS9DdUz2SswRwI2v4#rmCD?x,&iM4T6|!8E!w>V!WBu$WwrhLz','Vr19|.DW','l)_A)','f.{Z6Xs9fO|LqEa.!M:B59q','VriN]<~',gIj7_71(-0x8),'Ng_Af:Qmh','udHJ[','ihEDZGip','UqHJ@u$[J`{aC+Y','ihWR99.W!{f','t,3J0_2R?PP0>g','ihWR99mz','cQ1d','pr#dh,%iE','UqHJ@uwp','ZNQmB(}p','TPWRlT.W!{f','o@LS"o2q','_)K.fcx!x'
// 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"])