mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
18 lines
65 KiB
JavaScript
18 lines
65 KiB
JavaScript
|
/*
|
|||
|
单单返好礼
|
|||
|
|
|||
|
链接:https://pro.m.jd.com/mall/active/kqDEevEoa7PKjhFphP71YXEewNR/index.html
|
|||
|
|
|||
|
环境变量:
|
|||
|
JD_fanhaoli_InviterId // 指定助力码 非必须,不填默认助力账号一
|
|||
|
JD_fanhaoli_NUM // 指定人数 非必须,不填默认跑全部账号
|
|||
|
|
|||
|
cron:0 0,12 * * * jd_fanhaoli_help.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('单单返好礼助力');
|
|||
|
function fakers3vzts(){}var fakerumkm1r=Object['defineProperty'],fakerdtsqg8,fakerpu7isk,fakerw6nhvf,fakery23n45,fakergroyr,fakerj5fc5,fakerpieszdl,faker1pga2j,fakerkvklrr,fakerauokoo,fakerjqhmtq,fakerduosdh,fakerbkfham;function faker3pf6g(fakers3vzts){return fakerdtsqg8[fakers3vzts>0x2b?fakers3vzts>0x2b?fakers3vzts<0x76?fakers3vzts>0x76?fakers3vzts-0x4:fakers3vzts-0x2c:fakers3vzts-0x15:fakers3vzts+0x24:fakers3vzts-0x2a]}fakerdtsqg8=faker2flr6.call(this);var faker953vr=[],fakertsyq3b=['1oaCHM<E','^B.Lj*ZO','(8HS%','I>:S','ZyNsKvDyX;@a#;AltA','6V]3=','Zye!IDxWy+I+l6q=B<jB3bu!g,','Zye!IDxWy+I+l6k7$:r','xg4{n+6AaQD!EQ3PKDnK&0^t[L>','~QvBY}J]Z','yy$Ck}Pr','4Q,nC','AK[B','>"vB3b$r','81sB','rKH3=','IrJg;HV5|Cik6;b2ga<5|c[6=}34N>HxQ3.{=','gDjB%',':gFS,2YM7!dDLQ9>Ngp{9G:M7J9<(b*Q?U^}TO+Ow^Y$A;<5Y>iGL3EO4fr([Q7e_>s@Q2~2Z','emsB','Z9Fu]b[J2MIt|*&zVr1w8|su0p]3b(bAU5hZ9["p,J!i3Ys3jA~ouYnQi;n3b(bA',faker3pf6g(0x2e),faker3pf6g(0x2d),'emsB','Z9FuHbXl3>DSsSR+InALm3=g`','emsB',faker3pf6g(0x2c),faker3pf6g(0x2c),'"mJ1H&jr','1"FStb`','rKH3=',faker3pf6g(0x2d),'@>t{Y9`','tQD}4ntf@<k','e19!Qz=]],','PQD}4ntf@<I{"@"_SA','Igesd&pr','PQ~3OI`','jQL}vDltZ','aVp{}2^r','J@7uSYx}}n','emsB','?UuS"','J/XKXRkxB','3WdQ','3WvQ','pyXs','py:S','#LjB=','PQFST&vtZ',faker3pf6g(0x31),'qbv!%r=&>M7f2A','tL~3k}Pr','HKjB%','PQX34b:~u+zEA','T$e3w}T~V~Do*bM>','CLuS"','/UD}:o`','em1{#[$r','>"~3^GA!T','7m~3=','/U^}_D+tHJ=J@K','Or/"1&)','oihE','I;ooXrDX$rr^{!OEkh0/jYKhM/5iXr7Ub:*QKdp{W,`nCZ','uLFS3ne~V~1EA','@>t{Y9`','emsB','+R66U>dU&>>1n*@f]v<ty5#vDtOEU>b[G"PJ#~Qnk7=A(c','tL~3k}Pr',faker3pf6g(0x2e),'.iE!{bT2]JJo?"d','?#TQ','Xt!a0v`kb','@>63(2)eW<#ql6]pqdWGm[FWEfwEA','tL~3k}Pr','HKjB%','@>63(2)eW<#ql6]p|5H3=','@>63(2muT','.iE!{bT2]JJo?"d','SKU33bIeZ','"mtz[22M|^XC2LLe','1"H3=','Lb;#){G&?T,VpAp=~:g1U2vr','emsB','emsB','@>63(2muT','@>63(2)eW<#ql6]p~QvBC','"mt{=','{LiG7b:~T','@>63(2)eW<#ql6]p~QvBC','6UX3j','~QvB)gB~8^XoA','sr?"','mxJ2+RD','6UX3j','l"j#s2jr','emsB',faker3pf6g(0x2f),faker3pf6g(0x2f),'emsB','81sB',faker3pf6g(0x2c),faker3pf6g(0x2c),'vgV38}/EA<L','@>63(2)eW<#ql6]p~QvBC','@>63(2)eW<#ql6]pqdWGm[FWEfwEA','6UX3j','r,}Tb','l"j#s2jr',faker3pf6g(0x2c),faker3pf6g(0x2f),'tL~3k}Pr','emsB','81sB',faker3pf6g(0x2c),'emsB','k+FTuyzX>a.','@>63(2)eW<#ql6]pqdWGm[FWEfwEA','@>63(2)eW<#ql6]p|5H3=','6UX3j','6UX3j','l"j#s2jr','emsB',faker3pf6g(0x2f),'tL~3k}Pr','emsB','81sB',faker3pf6g(0x2c),'emsB','vgV38}/EA<L','@>63(2)eW<#ql6]p|5H3=',faker3pf6g(0x2c),'jQL}vDltZ','tL~3k}Pr','Tm%TF','T$e3v.`','QLIK4>`','PL^}}2fOpfUVA','@>63(2)eW<#ql6]p~QvBC','T$e3h.`','$BX3=6&jk<"q,KyptgWGm[lr','}N.{w}Cl&,#ql6]p','PQFSxD+t"^KrMKltDV833npr','}N.{w}kr','3muS','=mt{t','$"^}gVPr','z1@Z|I5rT','@>63(2muT','#QE}d&~2Z','?xMK','PQFSm:U=T',':gFS,2YM7!KDuqepwCG!D0!]{!x+2L&pL>cG}2fO:~','KKV39GU=B,cWA','QV)sR.`','@>63(2)eW<#ql6]pqdWGm[FWEfwEA','XZ7qZ0`','@>63(2)eW<#ql6]p|5H3=','G]$4','9VvB','jQFS3nPr','TkQ$8}GT>','dB4{K(kr','>M^4qgJ>]|E#WCNHS]<4P6ENkuj#0V(OVreRP!yPw','{46U5;7c{~FVeV2HepR','=&jBi{~i],_+"@Ye$|&"d','{46U5;7ctvu|Jo,OKkR','=(M}P=n','M5J1tb+jk<CJA','4Q6s?{80vP<EA','M5fB3b9j|Tw[PYy','>M^4qgJ>]|E#WC(SK|3.1Uv%h|+7&y~ldr(FPm#,A','VH#!j;<NxpE?"o&NlPX4','@:fZb2kr$8m0pYE>=A','M5C}y&^r','vgcSc&U=T','1{MU*^]q>','HPu[:+"0x$%mHYGlv8FsjfscN$pQ3X0r8]2F=+At=EsmntBG/ja>bd/!tPP^v{Hl2!u[Vjf(T_nc5a)tS~C$E@Y,6T_','@:a%AqmuG,9<.d3lSA','$VbGH&pr',':gFS,2YM"sO.:qepwCG!D0!]Z','2:US?{<0@<iJSc','po;ND@c;S$','G_asbUgrc:jJ3','55Q@aFIw','CRi@,',faker3pf6g(0x30),'}d:T','HKjB%','!k]@@}R/>','Uo(Fy}HT>','jQ?=]^n','7L4zuGW_Z','jQL}vDltZ','>"!S','9VvB',faker3pf6g(0x30),'~QVsCbe~T','e19!?{&>],DoA','Kmj#4G`s{!|fSrSdQ$+GL}SfYk(4DU*leio1tbBMwdB0A2f,I1]ru&RtfkG$#K]7M|HQCHaI[BtbKtC+Tw[6K~z8V"R3~%Lc<Q,v,71N]ru&RtfkxEHp;xm|KL^>!"o13#?,Hs*f4rH7}ZjBtbLZ#170"rtHaU${>[fOWB:o=u%HAyzG$x)(5sloPr?;rDMK','PQFS','KKE}{b`',faker3pf6g(0x2c),'72|dRSQ37=(EAZH28$b5X3|IM]YwF+Z2L$*?.HXSaj','em1{#[$r','[NC}m[`','ZKfB{nlr','mmtTI[T2;P','#m=17','rebG7b`','Nm^}=','R*tK2#[N,1R[hjm#','3LbGV//[;P','VI:K::lysS9}pwpP<d"7xeS$s,b@XwH~Y8)salFA','pyVs','py8s','pyXs','py:S','[NC}m[`',':mIS','[NC}m[`',faker3pf6g(0x31),'3LU%l1%TyJs^W.U{','%&nK@@!uifIC[8#laIWB"n.tF~#GA','fZpCp:
|
|||
|
// 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
|