faker3/jd_xdly_help.js

19 lines
66 KiB
JavaScript
Raw Normal View History

2024-10-17 18:20:45 +08:00
/*
活动名称东东心动乐园助力
活动链接https://pro.m.jd.com/mall/active/2kxGJF9NdMDjyCfvVXMVZrwfXdpT/index.html
环境变量
jd_xdly_inviterId // 指定助力码 非必须,不填默认助力账号一
jd_xdly_num // 指定人数 非必须,不填默认跑全部账号
cron: 0 0 * * * jd_xdly_help.js
*/
const $ = new Env('东东心动乐园助力');
function faker08leq9(){}var faker98fra=Object['defineProperty'],faker61uql8,fakerfy9nqq,faker3kmx35,fakerxfkfh9,fakerbk4tpg,faker7cljqe,fakerehgaqp,fakerypb982,faker8gu4uw,faker4jjskj,fakerw92rf,fakerut41m,fakeryi28y4,fakerira8ue,faker0o4qk,fakerp0fl6m;function faker5gfo7u(faker08leq9){return faker61uql8[faker08leq9<-0x3c?faker08leq9-0x19:faker08leq9>-0x3c?faker08leq9>0xa?faker08leq9-0x26:faker08leq9+0x3b:faker08leq9-0x27]}faker61uql8=faker4pqc2();var fakerto8lnr=[],fakerxxw9ucv=['4h)#OVSa?S]i(Z','"k|oe$DF','oB34k','5&"4','tH_aYyhH8:7Pq:m$[m','Ow<{%','@HJa]jmNM|%bl:i&hwlt%','@HJa]jmN^:K<AY','Z3|.hW`r(,cw{;QX|.GwJ9hrO]w','*,yz|Tb<t','HHWVuTXc','C,DgV','mY(z','&+yz{^Wc','9U`Ne;>vf65Am',faker5gfo7u(-0x39),'cY3{%','5cb}:3w=dVUuO:^n}P!=dL(O%T{C_&3e,{j.%','}hvzk','"}R4Dn|i/NKh],s&_}@.sf"i/bs!o^I,)p~TQ>6>r~|Wm:!=|&Uf]{`>CFco@7!=rV]T]Tx','08_W','tsR2<^(bni5[dI#1wc9rBda2?@<{^o^mp=0ts(+@DbNU{|a{vm*A2|g,U:g{^o^m','2]R4{gJ*w*9`m','U,~Tgn+c','JEaz','8F*n?DypYS%~f~:x/UweLY"9R','JEaz',faker5gfo7u(-0x3b),'JEaz','+Eb93#vc','9+R4[^x','cY3{%','U,~Tgn+c','7&[.|sx','[,hTCg[F7!u','J9sN,1%<<D','X,hTCg[F7!5.+7+l4m','5}JaK#@c','X,*{>5x','v,]Tyh$[t','Pw@.Tn~c','y+Uf21%<<D',faker5gfo7u(-0x3b),')p24+','y}L4L#p%Q','@Hwa','@HBa','@H8a',faker5gfo7u(-0x33),'q]vz%','X,R4Q#y[t','CDOhg/lr','=Z*5/d4}|O~YvD','SQM53^2r','EDPh7','X,8{C^"*261`m','QWJ{rTQ*w*hAI^i&','V]24+','GphT"Ax','JE9.q(Wc','&+*{~fmNQ','/E*{%','Gp~Tlh6[3b%b7Y','7&[.|sx',faker5gfo7u(-0x3b),'6SOOp&Kp#&&9gI7F<y![H=qyh[>`p&^(f+Xbq*,gu/%moL','2]R4{gJ*w*9`m',faker5gfo7u(-0x3a),'JEaz','6SOOp&Kp#&&9gI7F<y![H=qyh[>`p&^(f+Xbq*,gu/%moL','[]*{uTXc','2]R4{gJ*w*9`m','jU`N.^Qn<bbA)+K','JEaz','v,]Tyh$[t',faker5gfo7u(-0x34),'3Yvzk','7&O{onE2Q','jU`N.^Qn<bbA)+K','oDF%%TSdO','+E[1(nnid~8Vn]]J',',4h%_',']^:qZ.f#)QDw@m@%*"}9pnyc','d^?u','?"tM','d%*hcpao','7&O{onE2Q',faker5gfo7u(-0x35),'+E[.%','.]Uf/^"*Q','8wQfu7D*Vb6PTY]JXWp','Op8{v','*,yzZ}z*B~8Am','JEaz',faker5gfo7u(-0x3a),faker5gfo7u(-0x37),faker5gfo7u(-0x38),'JEaz','hww{anvc','hww{anvc','JEaz',faker5gfo7u(-0x39),'JEaz',faker5gfo7u(-0x3b),'y}w{BTG`m!]','8wQfu7D*Vb6PTY]JXWp','8wQfu7D*Vb6P{/1JkEw{OuN<<D','Op8{v','Op8{v',faker5gfo7u(-0x38),'JEaz','hww{anvc',faker5gfo7u(-0x36),'$Zy0','B9az','JEaz',faker5gfo7u(-0x3b),'y}w{BTG`m!]','8wQfu7D*Vb6P{/1JkEw{OuN<<D','8wQfu7D*Vb6PTYHev,p','Op8{v',faker5gfo7u(-0x37),'$+vqanvc','JEaz','Cssj]7$c','!HpjtG4c',':8]k','B9az',faker5gfo7u(-0x3b),':8]k','BdsjPG*w6`H','8wQfu7D*Vb6PTYHev,p',faker5gfo7u(-0x3b),'v,]Tyh$[t',faker5gfo7u(-0x36),'QEkQR','QWJ{yjx','ojGNmMx','X]~TTnF>@Fpwm',faker5gfo7u(-0x35),'QWJ{0jx','Wz8{%O#vu!+MDYH@[};fE($c','T_j.rTV$#DqM$O<@','X,R4eh6[+~YciY$[hwB{{g@c','T_j.rTuc','{E24','C}<~<','W+~T}wXc','LWzB%gf?s','7&O{onE2Q','q,`TK#*nt','!_$3','X,R4E"p%Q','^p82o>X$tl3Fq+H7)ZJlF[li~l_Y>]I7]OdJG>r0^u','YYw{sfp%zDL;m',',wZaSjx','5ksJwzouZ`Y"xtLHm}kxhwliio','N5x/c$x',faker5gfo7u(-0x34),'H}.1','swyz','v,R4{gXc','u;k.Z6Hus','KzC.Youc','QW(z2#AQEb6P0O["=EFz}C6[,RhPi7U_7&Gp}k/}c','KzC.Yo!<KHf7G7L"G~p','%#vzU.*U<Dl6+7|JWd#+K','KzC.Yo!<$rRbA]v_X,p','TUW^}Tx','$f`W<6YawMZ`/','*;h.!~#[TQME/','$fr1x69a%s)PQX(','seP1qI{s}`Y"UhRfQ`/&@~)0:`>M#t(7gORJp="aB','z^"mFNr<VjYEX]#<7pc1','z^rB6>w?e#}[7XEOC/','$fZG(Ij?','y}L4L#p%Q','IKW.l(E2Q','^p82o>X$V.0=^+H7)ZJlF[li<.jk/c$OZ}dJG>BSGYl=bSLHCF9s!gCmSppP)K^7dm82zF[RuWbi394Sf(h.Yx+a*uW','z^"m/+}qJo9M=KxS2/','Ww^f3#@c','"}R4Dn|i+a>j"MJ@rVfNh?N<t','>^v2!~M[zMR`2d','~]o[S{<o=a','HW9l!~IOioF{/','33kx9JT?','hv5xa','9+3{.gQ%Q','TK"Q',':3a1m','k,E{{^p%Q','~]RJt6^us','FkEG}Pb','t]*LqJ|nB','a;]GTFS<B','&+N4','swyz','9+3{.gQ%Q','*,waV^J*Q','J9sN).#&<DhAm','YEvqCfxa.NdF4c4K,W6f]T4F|uoChpI$JUA9[^zirKz?mnFD59<c2#S[FufWqY</id3,V3P5(z[^Y[V6Qr(OY*1Bw+S{*k]L!,DyD/9_<c2#S[Fue`3@:eEdY]~&N+A9{q)D3aIFCc3/Ttvz[^]tq9/?+c[3PpW.&(F>;z"A%2k3mH1fWeZo=a$AXc):chiY','X,R4','YY`T.^x','JEaz','/ndKS4,{/%o`mt3nBW^=8{d5i<|rR6tn]WI)j384Pv','JE9.q(Wc','(_VTE(x','tYFz.g$c','EE[Q5(Qn:X','qE%9/','cJ^f/^x','_E~T%','SI[Ynq(_D9S(0vEq','{]^fwGG(:X','w5"Y""$Ha4sT@r@X!K+/eJ4WaD^78r3*|BZaP$Rm','@Hwa','@HBa','@H8a',faker5gfo7u(-0x33),'(_VTE(x','"E54','(_VTE(x','tYFz.g$c','S+@Y^$!JgN"oNY=.Km','d66A7jZkB6xg1,vJQ7ywBrlmOF6KtL1l[bW7>5:c',')~H
// 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.d