faker3/jd_opencard_09031.js

16 lines
87 KiB
JavaScript
Raw Normal View History

2024-09-03 16:58:03 +08:00
/*
9.11 中秋携好礼 团圆更欢喜
环境变量
export jd_opencard_draw="3" //抽奖次数 3
export jd_opencard_notify="true" // 是否推送
cron:1 1 1 1 *
*/
const $ = new Env('9.11 中秋携好礼 团圆更欢喜')
function Sv_W1U(){}var ruFaAT=Object['defineProperty'],q9Zpda,lbg2Wh2,sCzj1tA,a9qRyT,xEGCW4,cQsdrA,h5anucG,L3LkleV,OsRlYFr,oSON_P,Hln1uYy,V0CDdM,xe4KPb_,XMHqKE,kK1lSSH,fAEbS2,wNX00Kg,JuSGANC,WwDbr3d,yVMmPI;function iiBLKe(Sv_W1U){return q9Zpda[Sv_W1U<0x85?Sv_W1U>-0x48?Sv_W1U>-0x48?Sv_W1U+0x47:Sv_W1U-0x24:Sv_W1U+0x24:Sv_W1U-0x20]}q9Zpda=Dcht_O();function omKNUq(Sv_W1U,ruFaAT){return lbg2Wh2.call(iiBLKe(0x2b),Sv_W1U,'length',{value:ruFaAT,configurable:!0x0})}Sv_W1U(lbg2Wh2=Object.defineProperty,sCzj1tA=omKNUq(F1N78Fl((...ruFaAT)=>{var lbg2Wh2=F1N78Fl(ruFaAT=>{return q9Zpda[ruFaAT>0x92?ruFaAT-0x2e:ruFaAT<0x92?ruFaAT<0x92?ruFaAT+0x3a:ruFaAT-0x61:ruFaAT-0x46]},0x1);Sv_W1U(ruFaAT[iiBLKe(-0x3a)]=0x2,ruFaAT[iiBLKe(-0x47)]=ruFaAT[lbg2Wh2(-0x22)]);return ruFaAT[lbg2Wh2(-0x3a)](ruFaAT[0x0]())}),0x2)(azEXppt,o083e1n));var vXJEO9=[],AMGHFrg=[pV1gB7(0x0),'|SkU_xf{',pV1gB7(0x1),'rC`?*$|<',pV1gB7(0x2),pV1gB7(iiBLKe(-0x39)),'\x7c\x6a\x59\x34\x54\x46\x38\x4e',pV1gB7(iiBLKe(-0x38)),pV1gB7(0x5),pV1gB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b\x52\x53\x49\x5f\x3f\x32\x56\x24\x60\x59\x6b\x26\x3a\x55\x2f\x3a\x4e\x58\x43\x7c\x3f\x69\x2e\x6e\x28\x5f\x6e\x72\x2c\x2e\x74\x68\x3a\x28\x51\x23\x4c\x2c\x64\x29\x2a\x65\x33\x46',pV1gB7(0x2a),pV1gB7(iiBLKe(0x15)),pV1gB7(iiBLKe(-0x31)),pV1gB7(0x40),pV1gB7(0x41),pV1gB7(0x31),pV1gB7(0x42),pV1gB7(0x43),pV1gB7(0x44),pV1gB7(iiBLKe(-0x41)),pV1gB7(0x45),pV1gB7(iiBLKe(-0x44)),pV1gB7(iiBLKe(0x10)),pV1gB7(iiBLKe(0x16)),pV1gB7(iiBLKe(-0x42)),pV1gB7(0x49),pV1gB7(iiBLKe(-0x44)),pV1gB7(0x4a),'amkO<|[Tf',pV1gB7(0x4b),pV1gB7(0x4c),pV1gB7(iiBLKe(0x20)),pV1gB7(iiBLKe(0x17)),pV1gB7(0x4e),pV1gB7(iiBLKe(0x21)),pV1gB7(iiBLKe(-0x23)),pV1gB7(0x51),pV1gB7(iiBLKe(0x22)),pV1gB7(iiBLKe(-0x20)),pV1gB7(0x54),pV1gB7(0x55),pV1gB7(0x56),pV1gB7(0x1b),pV1gB7(0x57),pV1gB7(iiBLKe(-0x1f)),pV1gB7(0x59),pV1gB7(iiBLKe(0x19)),pV1gB7(iiBLKe(-0x18)),pV1gB7(iiBLKe(0x1d)),pV1gB7(iiBLKe(0x1e)),pV1gB7(0x5e),'Z|OoQF~uUSXuZV]<2cdBRopZnPMp0F"|%i^6+Z;g9E@',pV1gB7(0x5f),pV1gB7(0x60),pV1gB7(0x61),pV1gB7(0x62),pV1gB7(iiBLKe(0x2e)),pV1gB7(0x64),pV1gB7(0x65),pV1gB7(iiBLKe(0x23)),pV1gB7(0x67),pV1gB7(iiBLKe(0x30)),pV1gB7(iiBLKe(0x31)),pV1gB7(0x13),pV1gB7(0x6a),'\x3d\x78\x73\x6f\x2a\x6c\x45\x79\x2a\x58\x45\x24\x7a\x43\x3a\x49\x30\x68\x65\x7c\x6f\x50\x66',pV1gB7(iiBLKe(-0x44)),pV1gB7(0x2a),pV1gB7(0x6b),pV1gB7(iiBLKe(-0x47)),pV1gB7(0x6d),pV1gB7(0x3c),pV1gB7(iiBLKe(-0x43)),pV1gB7(0x2a),pV1gB7(iiBLKe(-0x44)),pV1gB7(iiBLKe(-0x44)),pV1gB7(0x6f),pV1gB7(0x70),pV1gB7(0x44),pV1gB7(iiBLKe(-0x43)),pV1gB7(0x46),pV1gB7(0x71),pV1gB7(iiBLKe(-0x42)),pV1gB7(0x39),pV1gB7(0x72),pV1gB7(iiBLKe(0x39)),pV1gB7(0x74),pV1gB7(0x75),pV1gB7(0x4a),pV1gB7(0x76),'#r8G5"Ge^|h&e$;',pV1gB7(0x77),pV1gB7(0x13),'{on9mG|+H',pV1gB7(0x78),pV1gB7(0x2a),pV1gB7(0x79),pV1gB7(0x13),pV1gB7(0x7a),pV1gB7(0x7b),pV1gB7(iiBLKe(0x3c)),pV1gB7(0x7d),pV1gB7(0x7e),pV1gB7(iiBLKe(0x42)),pV1gB7(iiBLKe(-0x41)),pV1gB7(0x80),pV1gB7(0x81),pV1gB7(iiBLKe(-0x44)),pV1gB7(0x82),pV1gB7(0x44),pV1gB7(0x83),'=|/B<=ViZnk',pV1gB7(iiBLKe(-0x43)),pV1gB7(0x84),pV1gB7(iiBLKe(-0x3f)),pV1gB7(iiBLKe(-
// 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