mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
17 lines
89 KiB
JavaScript
17 lines
89 KiB
JavaScript
|
/*
|
|||
|
9.16 中秋团圆夜好礼聚好味
|
|||
|
|
|||
|
环境变量:
|
|||
|
export jd_opencard_draw="3" //抽奖次数 3
|
|||
|
export jd_opencard_notify="true" // 是否推送
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('9.16 中秋团圆夜好礼聚好味')
|
|||
|
function y7bPGH(){}var wKCRxXE=Object['defineProperty'],paFOa6,AVvUXc,Ys9Y37,YBCSKa3,YX8zS2,gS_eBz,gzXPn65,Y2XM7Mv,mvZQ7d,B5q6n5,bTWW94d,XU1sbh,h8gDO_,EglcooD,iJxTI8z,Y0XZ4yb,IJLjWf,dd4X5V,cTJMGi8,gCmMZnN,ZwNAU1D,sDrvwd;function y8WNUp9(y7bPGH){return paFOa6[y7bPGH>0x71?y7bPGH-0x4:y7bPGH+0x61]}paFOa6=iyPjrh();function ZxgGyt7(y7bPGH,wKCRxXE){AVvUXc(y7bPGH,'length',{value:wKCRxXE,configurable:!0x0});return y7bPGH}y7bPGH(AVvUXc=Object.defineProperty,Ys9Y37=GAAZkC((y7bPGH,wKCRxXE)=>{return wKCRxXE(y7bPGH())},0x2)(XCpTPw,S0NIqN));var I7BLaH=[],UoTkJHF=[cIBsXx(0x0),cIBsXx(0x1),'\x7c\x3a\x5b\x46\x31\x28\x3d\x7b',cIBsXx(y8WNUp9(-0x43)),cIBsXx(0x3),cIBsXx(0x4),cIBsXx(y8WNUp9(-0x55)),cIBsXx(y8WNUp9(-0x4e)),cIBsXx(0x7),cIBsXx(y8WNUp9(-0x4b)),cIBsXx(0x9),cIBsXx(y8WNUp9(-0x30)),cIBsXx(y8WNUp9(-0x4c)),cIBsXx(y8WNUp9(0x11)),cIBsXx(0xd),cIBsXx(0xe),cIBsXx(0xf),cIBsXx(y8WNUp9(-0x2f)),cIBsXx(0x11),cIBsXx(0x12),cIBsXx(y8WNUp9(-0x1c)),cIBsXx(y8WNUp9(0x2a)),cIBsXx(y8WNUp9(-0x27)),cIBsXx(y8WNUp9(-0x26)),cIBsXx(0x17),cIBsXx(0x18),cIBsXx(0x19),cIBsXx(y8WNUp9(-0x12)),cIBsXx(0x1b),cIBsXx(0x1c),cIBsXx(0x1d),cIBsXx(0x1e),cIBsXx(0x1f),cIBsXx(y8WNUp9(0x30)),cIBsXx(y8WNUp9(-0x61)),'ved]|6~g',cIBsXx(0x22),cIBsXx(0x23),cIBsXx(y8WNUp9(-0x36)),cIBsXx(y8WNUp9(-0x18)),cIBsXx(0x26),cIBsXx(0x27),cIBsXx(0x28),cIBsXx(0x29),cIBsXx(y8WNUp9(-0x61)),cIBsXx(0x2a),cIBsXx(0x2b),cIBsXx(y8WNUp9(-0x5f)),cIBsXx(0x2d),cIBsXx(y8WNUp9(-0x16)),cIBsXx(0x2f),cIBsXx(y8WNUp9(-0x15)),cIBsXx(0x31),cIBsXx(y8WNUp9(-0x5)),cIBsXx(0x33),cIBsXx(0x34),cIBsXx(0x35),cIBsXx(y8WNUp9(-0x5b)),cIBsXx(0x37),cIBsXx(0x38),cIBsXx(y8WNUp9(-0x11)),y8WNUp9(-0x60),cIBsXx(0x3a),cIBsXx(0x3b),cIBsXx(y8WNUp9(-0x10)),cIBsXx(0x3d),cIBsXx(0x3e),cIBsXx(0x3f),cIBsXx(0x40),cIBsXx(y8WNUp9(-0xf)),cIBsXx(0x42),cIBsXx(0x43),cIBsXx(0x44),cIBsXx(0x45),cIBsXx(0x46),cIBsXx(0x19),'\u0043\u0047\u0025\u0059\u0036\u0026\u0023\u0037\u005e\u006a\u0067\u0060\u0063\u0061\u007c\u003e\u0061\u0021\u003b\u0035\u003a\u0026\u003c',cIBsXx(y8WNUp9(-0x4a)),cIBsXx(0x34),cIBsXx(y8WNUp9(-0x56)),cIBsXx(y8WNUp9(-0x3)),cIBsXx(0x4a),cIBs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4d),cIBsXx(y8WNUp9(-0x5c)),cIBsXx(0x80),cIBsXx(0x81),'|+8sWt?',cIBsXx(y8WNUp9(-0x5d)),cIBsXx(y8WNUp9(-0x3f)),'TlqcGGxqX|)',cIBsXx(0x43),cIBsXx(0x83),cIBsXx(0x84),cIBsXx(y8WNUp9(-0x44)),cIBsXx(y8WNUp9(-0x47)),cIBsXx(0x87),cIBsXx(0x88),cIBsXx(y8WNUp9(0x23)),cIBsXx(y8WNUp9(-0x5f)),cIBsXx(y8WNUp9(0x4c)),cIBsXx(0x8b),cIBsXx(0x8c),cIBsXx(0x34),cIBsXx(y8WNUp9(-0x2a)),cIBsXx(y8WNUp9(-0x5e)),cIBsXx(y8WNUp9(-0x29)),cIBsXx(y8WNUp9(-0x2c)),cIBsXx(y8WNUp9(-0x59)),cIBsXx(y8WNUp9(0x22)),cIBsXx(0x92),cIBsXx(0x48),cIBsXx(y8WNUp9(0x24)),cIBsXx(0x19),cIBsXx(0x94),cIBsXx(0x95),cIBsXx(0x4d),cIBsXx(y8WNUp9(0x26)),cIBsXx(0x97),';Wqcw;7!X|)',cIBsXx(y8WNUp9(-0x5c)),cIBsXx(0x98),cIBsXx(0x98),cIBsXx(y8WNUp9(-0x5e)),cIBsXx(0x5e),cIBsXx(0x99),cIBsXx(y8WNUp9(-0x57)),cIBsXx(y8WNUp9(-0x5e)),cIBsXx(y8WNUp9(-0x5e)),cIBsXx(y8WNUp9(-0x58)),cIBsXx(y8WNUp9(0x25)),cIBsXx(y8WNUp9(-0x5c)),';Wqcw;xqh|)',cIBsXx(y8WNUp9(-0x5a)),cIBsXx(0x98),';Wqcw;7!X|)',cIBsXx
|
|||
|
|
|||
|
// 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
|