mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
12 lines
100 KiB
JavaScript
12 lines
100 KiB
JavaScript
|
/*
|
|||
|
活动名称:摇真金
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('摇真金')
|
|||
|
function e81Nxm(){}var s3VXS6=Object['defineProperty'],EtlpEU,dAkdzzy,hBcYUUy,mJVz1j,jv8rpe,yTD5x0B,Wj9qekB,Wyq4oN5,TYH6w4o,MI2CPF,y8H6b9G,_2K1tKS,G0RbYk,Imsz_Ph,C7Cesf,KYTfGZ,y9HYePq,bc17ME,AfA6mpS;function gIhROZq(e81Nxm){return EtlpEU[e81Nxm<0x13d?e81Nxm-0x21:e81Nxm+0x8]}EtlpEU=P2Ri7n.call(this);function pXAZK75(e81Nxm,s3VXS6){var hBcYUUy=i1m1qu(e81Nxm=>{return EtlpEU[e81Nxm<-0x3e?e81Nxm-0x30:e81Nxm>0xdf?e81Nxm+0x2:e81Nxm+0x3d]},0x1);return dAkdzzy(e81Nxm,hBcYUUy(-0x1d),{value:s3VXS6,configurable:hBcYUUy(0x4b)})}e81Nxm(dAkdzzy=Object.defineProperty,hBcYUUy=i1m1qu((e81Nxm,s3VXS6)=>{return s3VXS6(e81Nxm())},0x2)(Mz3HRQ,Czx0Xf));var JysTVu=[],w1YF1Q=[PvrQtfa(gIhROZq(0x35)),PvrQtfa(gIhROZq(0x3b)),PvrQtfa(gIhROZq(0x53)),PvrQtfa(0x3),PvrQtfa(0x4),'y@!Y]X0|',PvrQtfa(gIhROZq(0x51)),'\u0051\u0025\u0052\u004a\u004d\u004d\u002f\u007c',PvrQtfa(gIhROZq(0x3a)),'|":7E',PvrQtfa(gIhROZq(0x46)),PvrQtfa(gIhROZq(0x4d)),PvrQtfa(0x9),'+J|R`',PvrQtfa(0xa),PvrQtfa(gIhROZq(0x21)),PvrQtfa(0xc),PvrQtfa(gIhROZq(0x49)),'\x58\x3b\x4b\x46\x35\x7b\x7c\x3b\x2f',PvrQtfa(0xe),PvrQtfa(gIhROZq(0x39)),PvrQtfa(gIhROZq(0x6f)),PvrQtfa(0x11),PvrQtfa(gIhROZq(0x6e)),PvrQtfa(0x13),PvrQtfa(0x14),PvrQtfa(gIhROZq(0x3d)),PvrQtfa(0x16),PvrQtfa(0x17),PvrQtfa(gIhROZq(0x73)),PvrQtfa(0x19),PvrQtfa(0x1a),PvrQtfa(gIhROZq(0x2c)),PvrQtfa(0x1c),PvrQtfa(0x1d),PvrQtfa(0x1e),PvrQtfa(gIhROZq(0x99)),PvrQtfa(gIhROZq(0x74)),PvrQtfa(0x21),PvrQtfa(0x1c),PvrQtfa(gIhROZq(0x21)),PvrQtfa(gIhROZq(0x75)),PvrQtfa(0x23),PvrQtfa(gIhROZq(0x76)),PvrQtfa(0x25),PvrQtfa(0x26),PvrQtfa(0x27),PvrQtfa(0x28),PvrQtfa(0x29),PvrQtfa(gIhROZq(0x7b)),PvrQtfa(0x2b),PvrQtfa(gIhROZq(0x78)),PvrQtfa(gIhROZq(0x38)),PvrQtfa(0x2e),PvrQtfa(0x2f),PvrQtfa(0x30),PvrQtfa(0x31),PvrQtfa(0x32),PvrQtfa(0x33),PvrQtfa(0x34),PvrQtfa(0x35),PvrQtfa(0x36),PvrQtfa(0x37),PvrQtfa(0x38),PvrQtfa(0x39),PvrQtfa(0x3a),PvrQtfa(gIhROZq(0x5c)),PvrQtfa(0x3c),PvrQtfa(gIhROZq(0x22)),PvrQtfa(gIhROZq(0x40)),PvrQtfa(0x3f),PvrQtfa(0x40),PvrQtfa(0x41),PvrQtfa(gIhROZq(0x29)),PvrQtfa(gIhROZq(0x31)),PvrQtfa(0x44),PvrQtfa(gIhROZq(0x88)),PvrQtfa(0x46),PvrQtfa(0x47),PvrQtfa(gIhROZq(0x3f)),PvrQtfa(gIhROZq(0x60)),PvrQtfa(gIhROZq(0x8d)),PvrQtfa(0x4b),PvrQtfa(0x4c),PvrQtfa(0x4d),PvrQtfa(0x4e),PvrQtfa(0x3d),PvrQtfa(gIhROZq(0x50)),PvrQtfa(0x50),PvrQtfa(0x51),PvrQtfa(gIhROZq(0x33)),PvrQtfa(0x53),PvrQtfa(0x52),PvrQtfa(gIhROZq(0x22)),PvrQtfa(0xb),PvrQtfa(gIhROZq(0x22)),PvrQtfa(0x3d),PvrQtfa(0x54),PvrQtfa(gIhROZq(0x26)),PvrQtfa(gIhROZq(0x97)),PvrQtfa(0x57),PvrQtfa(gIhROZq(0x24)),PvrQtfa(gIhROZq(0x25)),PvrQtfa(gIhROZq(0x27)),PvrQtfa(0x5b),'l|"6w',PvrQtfa(gIhROZq(0x98)),PvrQtfa(0x5d),PvrQtfa(gIhROZq(0x9a)),PvrQtfa(gIhROZq(0x9b)),PvrQtfa(0x60),PvrQtfa(0x61),PvrQtfa(0x62),PvrQtfa(0x63),'{|q(}=+l6',PvrQtfa(0x64),PvrQtfa(0x65),PvrQtfa(0x66),PvrQtfa(gIhROZq(0x23)),PvrQtfa(0x68),PvrQtfa(0x69),PvrQtfa(0x6a),'l|At}=LAo1M@E',PvrQtfa(0x6b),PvrQtfa(0x6c),PvrQtfa(gIhROZq(0x9e)),PvrQtfa(gIhROZq(0x9f)),PvrQtfa(gIhROZq(0x28)),PvrQtfa(gIhROZq(0xa1)),PvrQtfa(0x71),PvrQtfa(gIhROZq(0x30)),PvrQtfa(0x73),PvrQtfa(0x74),PvrQtfa(0x75),PvrQtfa(0x76),PvrQtfa(0x77),PvrQtfa(0x78),PvrQtfa(gIhROZq(0x42)),PvrQtfa(gIhROZq(0x23)),PvrQtfa(0x7a),PvrQtfa(0x7b),PvrQtfa(0x7c),PvrQtfa(gIhROZq(0x77)),PvrQtfa(gIhROZq(0x23)),'s0Fg;r3!y":{Q~C=!zw|RI(',PvrQtfa(0x7e),PvrQtfa(0x52),PvrQtfa(0x65),PvrQtfa(gIhROZq(0x5b)),'\u0036\u004f\u0053\u0052\u0061\u003f\u0068\u0044\u0076\u0061\u007a\u006c\u0040\u0067\u0050\u004a\u004f\u0022\u0073\u007c',';3L|&^ig&cytZlcnAAS50ME',PvrQtfa(0x7f),PvrQtfa(0x80),PvrQtfa(0x81),PvrQtfa(0x82),PvrQtfa(gIhROZq(0xa7)),PvrQtfa(gIhROZq(0xa8)),PvrQtfa(gIhROZq(0x24)),PvrQtfa(gIhROZq(0x25)),PvrQtfa(0x85),PvrQtfa(gIhROZq(0x21)),PvrQtfa(0x3d),PvrQtfa(0x3d),PvrQtfa(gIhROZq(0x94)),PvrQtfa(gIhROZq(0x26)),PvrQtfa(0x56),PvrQtfa(0x57),PvrQtfa(0x58),PvrQtfa(0x86),PvrQtfa(gIhROZq(0x27)),PvrQtfa(gIhROZq(0x79)),PvrQtfa(0x88),PvrQtfa(0x89),PvrQtfa(0x5e),PvrQtfa(gIhROZq(0x2a)),PvrQtfa(gIhROZq(0xac)),PvrQtfa(0x8c),PvrQtfa(gIhROZq(0x65)),PvrQtfa(0x8e),PvrQtfa(gIhROZq(0x2d)),PvrQtfa(0x8f),PvrQtfa(0x90),PvrQtfa(0x91),PvrQtfa(0x76),'_|X_85L>vzEIGkq|xb#{A%}',PvrQtfa(0x92),PvrQtfa(0x93),PvrQtfa(0x94),PvrQtfa(gIhRO
|
|||
|
// 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
|