mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
18 lines
59 KiB
JavaScript
18 lines
59 KiB
JavaScript
|
/*
|
|||
|
活动名称:3C助力
|
|||
|
活动链接:https://prodev.m.jd.com/mall/active/fKW365QTACmt4i6Dmq5v3jTfqv4/index.html
|
|||
|
|
|||
|
环境变量:
|
|||
|
jd_3c_inviterId // 指定助力码 非必须,不填默认助力账号一
|
|||
|
jd_3c_num // 指定人数 非必须,不填默认跑全部账号
|
|||
|
|
|||
|
0 12 * * * jd_3c_help.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('3C助力');
|
|||
|
function faker07bydeg(){}var faker0qp4vl=Object['defineProperty'],faker8pnuyq,fakerkn49b,fakeridy4tv,faker3f2bhb,fakerova3usc,fakernlaepj,faker2780qq,fakerqxkf6tt,fakerusoplb,fakerckogw6,fakerdcok5l,faker7q1i8o,fakernlkbyt,fakerevsqe9,fakerquepab,fakernbfdie;function faker112vv4(faker07bydeg){return faker8pnuyq[faker07bydeg<0x1f?faker07bydeg>0x1f?faker07bydeg-0x61:faker07bydeg<0x1f?faker07bydeg<0x1f?faker07bydeg+0x1f:faker07bydeg+0x6:faker07bydeg-0x57:faker07bydeg+0x59]}faker8pnuyq=fakerunnm7.call(this);var fakerdfj2b=[],fakers6ku4f=['y`D8V{[r','_%c@U','NV+@','A(d/TRhKwD8kPshz','C2p53','A({p!!Je+fUDHFYV[(Z','A({p!!=B%"]','8"r2kRE9yEJS>F%XLmK)fh?eJy%','fTmGFS"p?','((9^,S$~','xTb=^','1)BG','V>mG5w9~','%]/G','~)c53','N~"j7c2z`^*,C7wRjJ}z`[BC3S5xHVc&T5I|3','j8rGU','+jt@bRFouWE8yTgVHjA|gO+ou"g}_wlT6ZYSvKhKDYF917}zFV*Oy5eKx0`w_wX+zn0G',faker112vv4(-0x1f),'?gtPpwB"RoNX`liL2~]D%`/P!Ap5w_w1Zz.?gB>Ab"W*5F/5r1fkPF=T*7=5w_w1','Pyt@5=df2f]e1',faker112vv4(-0x1e),'dn/G','?gtPcw#:5V8@/@<hN=1yn53j;','dn/G',faker112vv4(-0x1f),faker112vv4(-0x1f),'>n"]cir~',']>t@Xw;','~)c53',faker112vv4(-0x1e),'."QV!Uv','XT8Sx=X0M},','#,U)k$566*','GkjWO]Q9.y/V(.(+3P','Njd/EiA~','GkD7e/v',faker112vv4(-0x16),'J2A|SRY~','m>*OPL3ppb','#[En','!"t7]m2&,9_{+l','Xyf5,S$~','qlYnJ','$T#5xw+fPhLe1','v9d5DSvf2f8klwoV','^yP@>','{Z8S+k;','a?d^OYh0','V>f5YO1Wv','unf53','{ZYSq8hXc"3"M)','MVX|Fg;','dn/G','h<CCZVEZiVV]=lM0pm}X(zQm8XKeZVwBO>$"QfT=,u31_[','Pyt@5=df2f]e1',faker112vv4(-0x1a),'dn/G','Y^oog)Hgw))RrW"X${yVI!.{,VUdg)9xf8N}.FLrvbuhEp',faker112vv4(-0x1d),'B;#c/r`FaFRdh',faker112vv4(-0x1c),'dn/G','rTySm8:X?','MVC5_Rad4}Qs:CpAsE4OnBt4e0De1',faker112vv4(-0x1d),'c)rGU',faker112vv4(-0x18),faker112vv4(-0x1b),faker112vv4(-0x1c),'@)Z55wNd?','>nXLBRRo`Y#^Ryyd',']>c53','yw7Qa|Oi6vb2A1A3f+j]ZRm~',faker112vv4(-0x1f),'dn/G',faker112vv4(-0x1b),'MVC5_Rad4}Qs:CpAfTmG^','>nX|3','|y*Ouw+fv','MVC5_Rad4}Qs:CpAfTmG^','CZ#5r','rw?W=LWrNXHg[','dn/G',faker112vv4(-0x1a),'CZ#5r',':>rQ/Rr~',faker112vv4(-0x1f),'8225/Rr~','o}}s>.Jh',faker112vv4(-0x1f),faker112vv4(-0x17),'d(>w','dn/G','2W}svmKf"*n','MVC5_Rad4}Qs:CpAfTmG^',faker112vv4(-0x19),'CZ#5r','CZ#5r','rx|vO_|Z','dn/G','8225/Rr~','V6Xb#o{Z','YdOq','nDOq','YdOq','dn/G',':38bno/J156',faker112vv4(-0x19),faker112vv4(-0x18),'CZ#5r','CZ#5r',':>rQ/Rr~',faker112vv4(-0x1f),'8225/Rr~','Xyf5,S$~','dn/G',faker112vv4(-0x17),faker112vv4(-0x1f),faker112vv4(-0x1f),'mj25%S{e1}y','MVC5_Rad4}Qs:CpA`zc53','dn/G','rTySm8:X?','Xyf5,S$~','vnUvt','v9d5mI;','TyN)xV;','$yYSSR0KA0Z21','MVC5_Rad4}Qs:CpAfTmG^','v9d5.I;','9G#53Cir,}>sb)(AXj4OnB:~','SHI|DS^:ibQs:CpA','$Tt@&8hX>Y)~o):X82%55=A~','SHI|DS,~','5nP@','3nX|X','9>YSj2$~','L]M?`Nz~v',faker112vv4(-0x1b),'QTeSEifR?','6&S)','Ey|)','C&XMkA;','nnK|DSGvnb.e1','$Tt@n+Z3v','+jt@bRFouW)8PsdAD^OW8!Wp|W&hRyiAyV[OSR0K+f','))25gOZ3Gb[41','T2a/<I;','MVC5_Rad4}Qs:CpAsE4OnBt4e0De1','w@;t@=i','bN6y:P0+.#vtS6X`WK*yn',faker112vv4(-0x1f),faker112vv4(-0x15),'{Mauyzcf','oM[r<e+o,','!Gm8_:~f',',lHGgV],^&dqZ6QkK^sG1mdQMa7q/bDYbN|L1R;1f','EGx|)_}pE(OM{M[+{YZ','nV{GD8oDXUCdIb9+lWVI!','EGx|)_}p:Dt"kyrH$TZ','"Dle1"i','oz"]Xwhr,}^"1','mM6r38}=Jc#hx','/KsGye({W,pHc9%',',lHGgV],^&dqZ6DKc&xz)8p?*&P#};%`5ND>1Eq{@','bkqR7:sQIjdh9A}Q`12G','M+0?wR,~9%n!AFeV31','/K<"%Vjf','lE9|qBnPv','k1auUP9/Ir?Ekt+`p<>F7=FXQrj[x2/N<^B>"P@S"dFEiSO+n7(,35nRS11Hp!k`BRaub7=Do$iX_(0SK%6rdyt{mo$','bkqRxt^g>U(#E!ySux','l[e>*V`f','+jt@bRFo>/KI+sdAD^OW8!Wp?','PkLu38#=b#D&uB','jA:QTyX:Kr','+$(F38VNXU7]x','))25gOm~','6Lwy{','$I*y8z,n,','SE+v','*_{GR','RM^yyeLn,','8AD>;eko,','82eSnB;','uyxLPO4q?',faker112vv4(-0x16),'NIFu',faker112vv4(-0x15),']>c5|=v3v','fT2/^wdfv','d]gW6|iVpb8k1',')nrQxO;/|W`0@~@ET9hOyS@0F,_x8Zl:d*k]XwGoDEG!1R0bN]p~Pi<X0,O9Q)puo`cT^cJNBGXw)X^hvDBC)fL%2><5fUy[}Tbmbu]Hp~Pi<X0,&ecA7&n`)yYVW>k]5Q6bc/l0x~cuS?rGXwy?Q]u!>~XcJZ9|VB0K4G+k3PUc1(LO9&a_z/:k$~67~8o)','$Tt@','))eS|w;',faker112vv4(-0x1f),'uR`E<@T5u3_e1?cR%9wz#5`NopFDth?Ry9l6Ic#@Jr','dn]|QB9~','BH^SnB;','?)0G|=:~','0%I)e2#dP$:','7n2S?hKV"T!Bv{9>9jcSf=2}p%H!v,D:[8Wv>','!hq?&k>:w0a3u,KH)MVM.9.9<Eg#ky7>$w7?','~$[ixoeDRTJt[7vrc*~uY!V9Ty<Ol%euS2Wiq+D$v','#8h^/R|}B$0I3F%bh]5pX4%Pe0Y|1','#8mMaQ|dzY2tKM[fiE>pEL&19%(s
|
|||
|
|
|||
|
// 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
|