faker3/jx_fcwb_help.js

18 lines
66 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
地址
https://bnzf.jd.com/?activityId=CmPJ1svf_qoTYXEwfOkKPg
环境变量
JD_FCWB_InviterId // 指定助力码 非必须,不填默认助力账号一 格式inviterId&inviterCode
JD_FCWB_NUM // 指定人数 非必须,不填默认跑全部账号
2024-12-13 19:58:22 +08:00
cron:1 1 1 1 *
2024-11-12 11:17:55 +08:00
*/
const $ = new Env('特价现金挖宝助力')
2024-12-13 19:58:22 +08:00
function Zpx5Jwi(){}var khpywv=Object['defineProperty'],iHFtrb,tB0Ro3Y,ER_8678,Y_kAek,v3A_jp,v5V89Y,Un2Or9b,tZS_MrA,kEMWzXK,_5EJQR,la_caW,jP_yP2,YToHgk,NUgt_u,e6fy7n,ALbZRYl,hubOQv1,tl2IUnS;function imbF7q(Zpx5Jwi){return iHFtrb[Zpx5Jwi>0xd8?Zpx5Jwi+0x31:Zpx5Jwi<0xd8?Zpx5Jwi>0xd8?Zpx5Jwi+0x11:Zpx5Jwi-0x34:Zpx5Jwi+0x24]}iHFtrb=S8KiWcc();function wgewNpF(Zpx5Jwi,khpywv){var ER_8678=MInfsGa(Zpx5Jwi=>{return iHFtrb[Zpx5Jwi<-0x4f?Zpx5Jwi-0x3d:Zpx5Jwi<0x56?Zpx5Jwi>0x56?Zpx5Jwi-0x50:Zpx5Jwi+0x4e:Zpx5Jwi+0x33]},0x1);tB0Ro3Y(Zpx5Jwi,ER_8678(-0x4e),{value:khpywv,configurable:!0x0});return Zpx5Jwi}Zpx5Jwi(tB0Ro3Y=Object.defineProperty,ER_8678=wgewNpF(MInfsGa((...khpywv)=>{var tB0Ro3Y=MInfsGa(khpywv=>{return iHFtrb[khpywv<0xb2?khpywv-0xe:khpywv+0x15]},0x1);Zpx5Jwi(khpywv[imbF7q(0x34)]=imbF7q(0x42),khpywv.b3lvUtz=khpywv[tB0Ro3Y(0x10)]);return khpywv.b3lvUtz(khpywv[tB0Ro3Y(0xf)]())}),0x2)(eHqcMek,nqEGVp));var xTjgbhw=[],KseWFAJ=[lhMkEwE(imbF7q(0x35)),'^2|p3QUW',lhMkEwE(imbF7q(0x36)),lhMkEwE(0x2),lhMkEwE(0x3),lhMkEwE(imbF7q(0x41)),lhMkEwE(imbF7q(0x37)),lhMkEwE(0x6),lhMkEwE(imbF7q(0x38)),lhMkEwE(imbF7q(0x56)),lhMkEwE(0x9),lhMkEwE(0xa),lhMkEwE(imbF7q(0x5c)),lhMkEwE(imbF7q(0x4d)),lhMkEwE(imbF7q(0x5e)),lhMkEwE(0xe),lhMkEwE(0xf),lhMkEwE(imbF7q(0x60)),lhMkEwE(0x9),lhMkEwE(0xa),lhMkEwE(imbF7q(0x37)),lhMkEwE(imbF7q(0x38)),lhMkEwE(0xb),'|#"eJR!4[_?T2',lhMkEwE(0x11),'j!gc.E1ApC+i64P6|#"eJR!4[_C',lhMkEwE(imbF7q(0x4e)),lhMkEwE(0x13),'ZCz@?|F%:;7.cQj"jhEqcz"g%8/1jL=A:xgM!9^~:+HHN',lhMkEwE(0x14),lhMkEwE(0x15),'N[%0=|7ia;boLI8@=^K~kyHFo/w4(LisHN','G!`"TY!RXS|iQ)M652','|#"eJRvH',lhMkEwE(imbF7q(0x68)),lhMkEwE(0x17),lhMkEwE(imbF7q(0x69)),lhMkEwE(0x19),lhMkEwE(0x1a),lhMkEwE(0x1b),lhMkEwE(imbF7q(0x6b)),lhMkEwE(0x1d),lhMkEwE(imbF7q(0x6f)),lhMkEwE(imbF7q(0x4c)),'kNjotd.~3y|sgt9@oGL~3E"gYOhF0+d,1h[vY',lhMkEwE(0x20),lhMkEwE(0x21),'F2CNj*/Ri^(Sf@[}/i9E[.&W`.KY}F%1c>M|,I*u7_NQnyAS;t)Sdu/H>5A',lhMkEwE(0x22),lhMkEwE(imbF7q(0x5a)),lhMkEwE(0x24),lhMkEwE(imbF7q(0xd2)),'F2CNj*/Ri^(Sf@[}/i9E[.Lbo>|V`o71c>M|,I*u:>U^,SHUYR?EA*^075A',lhMkEwE(0x26),lhMkEwE(imbF7q(0x50)),'F2CNz*0U6^(Sf@[}/i9E[.Lbo>|V`o71c>M|,I*u:>U^,SHUYR?EA*^0<))Y`|+0zLZc','|1`OS@fN',lhMkEwE(imbF7q(0x39)),lhMkEwE(0x29),lhMkEwE(0x2a),lhMkEwE(imbF7q(0x90)),lhMkEwE(imbF7q(0x8d)),'Af|={_YVVz',lhMkEwE(0x2d),lhMkEwE(0x2e),lhMkEwE(0x2f),lhMkEwE(0x30),lhMkEwE(0x31),lhMkEwE(imbF7q(0xa9)),lhMkEwE(0x33),lhMkEwE(0x34),lhMkEwE(0x35),lhMkEwE(0x36),lhMkEwE(0x25),lhMkEwE(imbF7q(0x8e)),lhMkEwE(imbF7q(0x39)),imbF7q(0x3b),lhMkEwE(imbF7q(0x70)),lhMkEwE(0x39),lhMkEwE(0x3a),lhMkEwE(0x3b),lhMkEwE(0x3c),lhMkEwE(imbF7q(0x73)),lhMkEwE(imbF7q(0x71)),lhMkEwE(imbF7q(0x44)),lhMkEwE(0x40),lhMkEwE(imbF7q(0x79)),lhMkEwE(imbF7q(0x8a)),lhMkEwE(0x43),lhMkEwE(0x44),lhMkEwE(imbF7q(0x3d)),lhMkEwE(imbF7q(0x65)),lhMkEwE(0x46),lhMkEwE(0x40),lhMkEwE(0x47),lhMkEwE(imbF7q(0x3a)),lhMkEwE(imbF7q(0x46)),lhMkEwE(imbF7q(0x45)),':9??oxHohR8Taej|*8ZH',lhMkEwE(imbF7q(0x7d)),lhMkEwE(0x4c),lhMkEwE(0x4d),lhMkEwE(0x4e),lhMkEwE(0x4f),lhMkEwE(0x50),lhMkEwE(0x51),lhMkEwE(0x47),lhMkEwE(imbF7q(0x77)),lhMkEwE(0x53),lhMkEwE(imbF7q(0x80)),'vM|=e97:}',lhMkEwE(0x53),lhMkEwE(0x55),lhMkEwE(0x56),lhMkEwE(0x57),'|@&dd9X60)a:ih*ZZCtBy,)A.;u(HJd@66zjmWy544/1O.jjpWt{sSM9E<Q2,!8OQ)LE',lhMkEwE(imbF7q(0x3a)),'|@&dd9K(0+&w?$VsZCN]uQ2',imbF7q(0x3b),'|@&dd9X60)a:ih*ZZCtBy,)A.;u(HJd@66zjmWy544/1O.jjpWt{sSM9E<Q2,!8OQ)LE','i|I(,D+N',lhMkEwE(imbF7q(0x63)),lhMkEwE(imbF7q(0x95)),lhMkEwE(0x5a),lhMkEwE(0x36),lhMkEwE(0x5b),lhMkEwE(0x5c),lhMkEwE(0x55),lhMkEwE(0x55),'i|I(,DTx=Kk8H',lhMkEwE(0x5d),lhMkEwE(imbF7q(0x88)),lhMkEwE(0x53),lhMkEwE(imbF7q(0x3f)),lhMkEwE(imbF7q(0x3c)),lhMkEwE(0x5b),lhMkEwE(imbF7q(0x96)),lhMkEwE(0x55),lhMkEwE(0x3a),lhMkEwE(imbF7q(0x40)),lhMkEwE(0x43),lhMkEwE(0x60),lhMkEwE(0x61),lhMkEwE(imbF7q(0x3e)),lhMkEwE(imbF7q(0x3c)),lhMkEwE(0x5b),lhMkEwE(0x5c),lhMkEwE(0x55),lhMkEwE(imbF7q(0x3d)),lhMkEwE(0x5f),'i|I(,DTx=Kk8H',lhMkEwE(0x63),lhMkEwE(imbF7q(0x98)),lhMkEwE(imbF7q(0x97)),lhMkEwE(imbF7q(0x3e)),lhMkEwE(0x64),lhMkEwE(imbF7q(0x91)),lhMkEwE(0x66),lhMkEwE(0x67),lhMkEwE(imbF7q(0x3d)),lhMkEwE(0x7),lhMkEwE(imbF7q(0x9b)),lhMkEwE(imbF7q(0x9c)),lhMkEwE(0x6a),lhMkEwE(imbF7q(0x3f)),lhMk
2024-11-12 11:17:55 +08:00
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