faker3/jd_opencard_0826.js

15 lines
90 KiB
JavaScript
Raw Normal View History

2024-08-26 10:36:17 +08:00
/*
不会自动运行请在有水的时候运行
//export jd_opencard_draw="3" //抽奖次数 3
//export jd_opencard_break="true" //IP限制后继续执行true/false
cron "1 1 1 1 *" script-path=jd_opencard_0826.js
*/
const $ = new Env('8.26-9.2 活力开学季 惊喜添动力')
function NzOMpt(){}var LfoGFf=Object['defineProperty'],ZmDYXXI,DEGwatB,UPzJIjD,vyZTfM8,wKqjHa,V6EoBC,WmtIOS,DA5khQN,ozlXCT,B9re6w,HTGdkN,a9ZEkx,uUSk37N,cVUPd3,jCeYRS;function knzDnx(NzOMpt){return ZmDYXXI[NzOMpt>0x57?NzOMpt-0x7:NzOMpt>-0x53?NzOMpt>0x57?NzOMpt-0x1:NzOMpt>0x57?NzOMpt+0x51:NzOMpt+0x52:NzOMpt-0x31]}NzOMpt(ZmDYXXI=GZ4uwgL(),DEGwatB=wbmrlLy((NzOMpt,LfoGFf)=>{return LfoGFf(NzOMpt())},0x2)(qytiGz4,EISD0a));var Xvoe_M=[],RVCCse=[rKdLLg(knzDnx(-0x3c)),rKdLLg(knzDnx(-0x3d)),rKdLLg(knzDnx(-0x36)),rKdLLg(0x3),rKdLLg(knzDnx(-0x2b)),rKdLLg(knzDnx(-0x37)),'s|V2NztPZ7cG+_E44:+',rKdLLg(0x6),rKdLLg(0x7),rKdLLg(0x7),'4krd7!ja_%m,(_/7|3D}jp7W"M|$e(_fh)rVXV&',rKdLLg(knzDnx(-0x2f)),rKdLLg(0x9),rKdLLg(0xa),rKdLLg(knzDnx(-0x27)),rKdLLg(0xc),rKdLLg(0xd),rKdLLg(0xe),rKdLLg(knzDnx(-0x24)),rKdLLg(knzDnx(-0x25)),rKdLLg(0x11),rKdLLg(0x10),rKdLLg(0x11),rKdLLg(knzDnx(-0x51)),rKdLLg(knzDnx(-0x21)),rKdLLg(knzDnx(-0x2e)),rKdLLg(knzDnx(-0x22)),rKdLLg(knzDnx(-0x20)),rKdLLg(0x16),rKdLLg(knzDnx(-0x4e)),rKdLLg(0x10),'_<@o]|=y',rKdLLg(0x18),'/|f5jNAo',rKdLLg(0x19),'w|s5)jw&1U#','gb]v|Extt+','!|s5)jw&1Ue"A1A?>0',rKdLLg(0x1a),rKdLLg(0x1b),rKdLLg(0x1c),rKdLLg(0x1d),rKdLLg(0x1e),rKdLLg(0x1f),rKdLLg(0x20),rKdLLg(knzDnx(-0x23)),rKdLLg(0x22),rKdLLg(knzDnx(-0x19)),rKdLLg(knzDnx(-0x1b)),rKdLLg(knzDnx(0x10)),rKdLLg(0x26),rKdLLg(0x27),rKdLLg(knzDnx(-0x18)),rKdLLg(0x29),rKdLLg(0x2a),rKdLLg(0x2b),rKdLLg(0x2c),rKdLLg(0x2d),knzDnx(-0x4a),rKdLLg(knzDnx(-0x17)),rKdLLg(0x2f),rKdLLg(0x30),rKdLLg(0x12),rKdLLg(knzDnx(-0x13)),rKdLLg(0x12),rKdLLg(0x31),rKdLLg(0x32),rKdLLg(0x33),rKdLLg(0x34),'|q9@Cs8}98HZNi9JFk$NP0xo^u',rKdLLg(knzDnx(-0x50)),rKdLLg(knzDnx(-0x52)),'`;:cwlnK*4mbOL_{LJ[/Hl|^>Tw>gM^0DLToX+Ma21]ZF',rKdLLg(knzDnx(-0x1a)),rKdLLg(0x36),rKdLLg(knzDnx(-0x4f)),rKdLLg(knzDnx(-0x52)),'af>1m]cnm_zoxI1~(5xn4gTlr`1|5i9J5=;,`|]Ve)`LYt!Tg*gZ',rKdLLg(knzDnx(-0x42)),'HRAp3(|=gJ<J0$j{<k+',rKdLLg(0x39),rKdLLg(knzDnx(-0x1)),rKdLLg(knzDnx(-0x51)),rKdLLg(0x3b),rKdLLg(knzDnx(-0xe)),rKdLLg(knzDnx(-0x52)),rKdLLg(0x3d),rKdLLg(0x3e),rKdLLg(knzDnx(-0x3a)),rKdLLg(0x40),rKdLLg(0x41),rKdLLg(0x42),rKdLLg(0x43),'HRAp3(|=gJ+Ou',rKdLLg(0x44),rKdLLg(knzDnx(-0xb)),rKdLLg(0x34),rKdLLg(0x46),rKdLLg(knzDnx(0x3f)),rKdLLg(0x48),rKdLLg(0x49),rKdLLg(0x4a),rKdLLg(knzDnx(-0x9)),rKdLLg(0x4c),rKdLLg(knzDnx(-0x7)),rKdLLg(0x4e),rKdLLg(0x4f),rKdLLg(0x50),rKdLLg(0x51),rKdLLg(0x52),rKdLLg(knzDnx(0x3d)),rKdLLg(0x54),rKdLLg(knzDnx(-0x5)),rKdLLg(knzDnx(-0x10)),rKdLLg(knzDnx(-0x4)),rKdLLg(knzDnx(-0x3)),rKdLLg(knzDnx(-0x11)),rKdLLg(0x59),rKdLLg(0x5a),')RW3|?m{?6{[E~B',rKdLLg(knzDnx(-0x15)),rKdLLg(0x5c),'CaA@@|G',rKdLLg(0x5d),rKdLLg(0x5e),rKdLLg(0x5f),rKdLLg(knzDnx(-0x49)),rKdLLg(knzDnx(0x1)),rKdLLg(knzDnx(-0x46)),rKdLLg(knzDnx(0x43)),rKdLLg(0x64),rKdLLg(0x11),rKdLLg(0x65),'<rD.6n[vD[8B^(Dz]XU^L4|39e',rKdLLg(0x66),'[NQOK|GnULk',rKdLLg(knzDnx(-0x51)),rKdLLg(0x33),rKdLLg(knzDnx(0x3)),'HRAp3(|=gJ+Ou',rKdLLg(knzDnx(-0x50)),rKdLLg(0x2e),rKdLLg(0x30),rKdLLg(knzDnx(-0x4f)),rKdLLg(knzDnx(-0x4e)),rKdLLg(knzDnx(-0x4c)),rKdLLg(0x38),'4krd7!jal2?cN:imX2F5*FW2Tcf}N{:9/<L`ANEX1BSJmNG)xU0xK1vZh2287!_7>b"_7g|wmR{J%/8PY2a5S9y=U7!8W(*W8nmlJzJw$o=NeSimyoM`<8uu9BO',rKdLLg(knzDnx(0x4)),'HRAp3(|=gJ<J0$j{<k+',rKdLLg(0x49),rKdLLg(knzDnx(0x5)),rKdLLg(0x52),rKdLLg(0x6a),rKdLLg(0x50),rKdLLg(0x6b),rKdLLg(knzDnx(-0x43)),rKdLLg(knzDnx(0x6)),rKdLLg(knzDnx(0x7)),rKdLLg(0x6f),rKdLLg(0x70),rKdLLg(knzDnx(-0x41)),'EH~R6|KE<@CJU(s4n<BR',rKdLLg(knzDnx(0xb)),'{Awj>[p>0$|7IvtO;hAIe',rKdLLg(0x73),rKdLLg(0x74),rKdLLg(knzDnx(-0x40)),rKdLLg(0x76),rKdLLg(0x77),rKdLLg(0x78),'anv^Z|My',rKdLLg(knzDnx(0xc)),'{oI2X`|)"7LKu',rKdLLg(0x7a),rKdLLg(0x7b),rKdLLg(0x7c),'c,}L$&tXIok8FI($A{e1t6$p09Av+FI|)z}UZUGE','?e;[|n=WT',rKdLLg(knzDnx(-0x4d)),rKdLLg(0x7e),rKdLLg(0x7f),rKdLLg(knzDnx(-0x3b)),rKdLLg(0x81),rKdLLg(0x82),rKdLLg(0x83),rKdLLg(knzDnx(0x11)),rKdLLg(knzDnx(0x13)),rKdLLg(0x86),rKdLLg(0x87),rKdLLg(knzDnx(0x14)),rKdLLg(0x89),rKdLLg(knzDnx(0x15)),rKdLLg(knzDnx(0x16)),'vT`4O?K9o{2wJpLx<(TFVea|[04"AuDg41',rKdLLg(0x8c),rKdLLg(0x8d),rKdLLg(0x8e),rKdLLg(knzDnx(0x26)),rKdLLg(knzDnx(-0x45)),rKdLLg(0x90),rKdLLg(knzDnx(-0x4b)),rKdLLg(0x92),rKdLLg(0x7d),rKdLLg(0x30),rKdLLg(
// 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