mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 08:19:11 +08:00
11 lines
88 KiB
JavaScript
11 lines
88 KiB
JavaScript
|
/*
|
||
|
超市汪贝抽奖
|
||
|
|
||
|
cron:1 1 1 1 *
|
||
|
|
||
|
*/
|
||
|
const $ = new Env('超市汪贝抽奖')
|
||
|
function iPZAUu(){}var VXf4SA2=Object['defineProperty'],gAZEVkF,TEdoQO,MBSrIMy,ICxHEa,T2CJZv,LxW08O,AUxmL1q,PmMvMM,Gq6qkD,YiH1uBv,nrIX60,ucWmzFR,vcsbODJ,UxCxWrT,QiYv6x;function XfZz4j(iPZAUu){return gAZEVkF[iPZAUu<0x115?iPZAUu<0x115?iPZAUu-0x60:iPZAUu-0x2e:iPZAUu+0x35]}gAZEVkF=V5ZlH8e();function JHobLd(iPZAUu,VXf4SA2){return TEdoQO.call(null,iPZAUu,XfZz4j(0x68),{value:VXf4SA2,configurable:!0x0})}iPZAUu(TEdoQO=Object.defineProperty,MBSrIMy=FdRsJN((iPZAUu,VXf4SA2)=>{return VXf4SA2(iPZAUu())},0x2)(dKixQZ,GPvLp2));var U7rjyrR=[],qNSVwRM=[hmbYnje(0x0),hmbYnje(0x1),hmbYnje(XfZz4j(0x6a)),hmbYnje(0x3),hmbYnje(0x4),hmbYnje(XfZz4j(0x79)),hmbYnje(XfZz4j(0x76)),hmbYnje(0x7),hmbYnje(XfZz4j(0x60)),'m$|,M+^foy&]kMt4,S`fo~Ok*Ygw%Q+sKg@[*',hmbYnje(0x9),'\u0065\u003a\u007c\u007d\u002b\u0033\u0042\u0024',hmbYnje(0xa),hmbYnje(XfZz4j(0x60)),hmbYnje(0xb),hmbYnje(0xc),hmbYnje(0xd),hmbYnje(XfZz4j(0x8d)),hmbYnje(0xf),hmbYnje(0x10),hmbYnje(0x11),hmbYnje(XfZz4j(0x63)),hmbYnje(XfZz4j(0x87)),hmbYnje(0x14),hmbYnje(XfZz4j(0x65)),hmbYnje(0x16),hmbYnje(0x17),hmbYnje(XfZz4j(0x90)),hmbYnje(XfZz4j(0x8c)),hmbYnje(XfZz4j(0x7d)),hmbYnje(0x1b),hmbYnje(0x1c),hmbYnje(0x1d),hmbYnje(0x1e),hmbYnje(XfZz4j(0x10e)),hmbYnje(0x20),hmbYnje(0x21),hmbYnje(0x22),hmbYnje(0x23),hmbYnje(XfZz4j(0x91)),hmbYnje(0x25),hmbYnje(0x26),hmbYnje(0x27),hmbYnje(0x28),hmbYnje(0x29),hmbYnje(0x2a),hmbYnje(0x15),hmbYnje(XfZz4j(0x96)),'P,{v+iU/+Uy|fx]bH:XCgt0R>',hmbYnje(0x2c),hmbYnje(0x2d),hmbYnje(0x2e),hmbYnje(0x2f),hmbYnje(0x30),hmbYnje(0x31),hmbYnje(0x32),hmbYnje(XfZz4j(0x8e)),hmbYnje(0x33),hmbYnje(XfZz4j(0xa4)),'|",p^H}!',hmbYnje(0x35),hmbYnje(XfZz4j(0xa5)),XfZz4j(0x64),hmbYnje(0x37),hmbYnje(0x38),hmbYnje(0x39),hmbYnje(0x3a),hmbYnje(0x3b),hmbYnje(0x3c),hmbYnje(0x3d),hmbYnje(0x3e),hmbYnje(0x3f),':Ndhp|<"',hmbYnje(0x40),'|)}.isj7',hmbYnje(0x41),hmbYnje(XfZz4j(0xff)),hmbYnje(0x43),hmbYnje(0x44),hmbYnje(0x45),hmbYnje(0x3e),hmbYnje(0x46),hmbYnje(0x47),hmbYnje(XfZz4j(0xfa)),'\u006c\u0023\u0079\u0061\u0054\u0042\u0031\u0067\u005e\u0046\u0039\u005a\u003d\u007b\u0077\u0031\u0036\u0076\u006c\u0067\u0024\u005e\u0032\u003c\u002b\u0073\u002b\u0048\u0078\u003f\u004c\u003f\u0021\u0059\u0067\u0057\u007c\u002e\u0071\u006c\u004a\u004c\u0069',XfZz4j(0x61),hmbYnje(XfZz4j(0xaa)),hmbYnje(0x4a),XfZz4j(0x61),hmbYnje(XfZz4j(0xab)),hmbYnje(XfZz4j(0x62)),'P,{v+iU/+Uy|fx]bH:XCgt0RtMR=C~',hmbYnje(XfZz4j(0xac)),hmbYnje(0x4e),hmbYnje(XfZz4j(0x62)),hmbYnje(0x4f),hmbYnje(XfZz4j(0xb6)),hmbYnje(XfZz4j(0xae)),hmbYnje(0x52),'\x6f\x52\x76\x30\x6a\x76\x7c\x7d\x2b\x79\x43\x52\x64\x3e\x43\x73\x3a\x40\x7c\x57\x6f\x53\x62\x32\x66\x33\x2a',hmbYnje(0x15),hmbYnje(0x53),hmbYnje(0x54),'P,{v+iU/+Uy|fx]bH:XCgt0R>','[|$q{',hmbYnje(XfZz4j(0x63)),hmbYnje(0x15),hmbYnje(0x15),hmbYnje(0x55),hmbYnje(0x56),'p)|}Pt%$',hmbYnje(XfZz4j(0x67)),hmbYnje(XfZz4j(0x83)),'P,{v+iU/+Uy|fx]bH:XCgt0RtMR=C~',hmbYnje(0x59),hmbYnje(0x5a),hmbYnje(XfZz4j(0x7f)),XfZz4j(0x64),hmbYnje(0x5c),hmbYnje(0x5d),hmbYnje(0x5e),hmbYnje(XfZz4j(0x9f)),hmbYnje(0x5f),hmbYnje(0x60),hmbYnje(XfZz4j(0xb7)),hmbYnje(0x62),hmbYnje(0x63),hmbYnje(XfZz4j(0xbd)),hmbYnje(0x3c),hmbYnje(XfZz4j(0x66)),hmbYnje(0x66),hmbYnje(XfZz4j(0x85)),hmbYnje(XfZz4j(0x9c)),hmbYnje(0x64),hmbYnje(XfZz4j(0xc4)),hmbYnje(XfZz4j(0x65)),hmbYnje(XfZz4j(0x66)),hmbYnje(0x12),hmbYnje(0x15),hmbYnje(XfZz4j(0x65)),hmbYnje(0x6a),hmbYnje(0x6b),'P,{v+iU/+Uy|fx]bH:XCgt0R{NJSyAKsN"k2L',hmbYnje(XfZz4j(0x65)),hmbYnje(XfZz4j(0x63)),hmbYnje(0x20),hmbYnje(XfZz4j(0xc5)),'\u007a\u0032\u0078\u0028\u006d\u0066\u005f\u0030\u007d\u007c\u0041\u0026\u0065',hmbYnje(0x6d),'P)5Y"zqnb`X|7',hmbYnje(0x6e),hmbYnje(XfZz4j(0xc7)),'y26On"m;nmM!P,p`QVx(C#B|=',hmbYnje(XfZz4j(0xbe)),hmbYnje(0x71),hmbYnje(XfZz4j(0x9a)),hmbYnje(0x73),'\u0056\u0037\u003a\u007c\u0048\u0023\u0070\u004e',hmbYnje(0x74),hmbYnje(0x75),hmbYnje(XfZz4j(0xcc)),'\u0064\u004f\u0024\u007c\u003b\u0026\u0044\u004e','\x7c\x73\x4f\x35\x7d',hmbYnje(XfZz4j(0xcd)),hmbYnje(0x78),hmbYnje(XfZz4j(0x69)),hmbYnje(0x7a),hmbYnje(XfZz4j(0xce)),hmbYnje(0x7c),'ETDt}a}P+|x`tetj%,)',hmbYnje(0x7d),'5E[|h;aort*]e',hmbYnje(0x7e),hmbYnje(0x7f),hmbYnje(XfZz4j(0x67)),hmbYnje(XfZz4j(0x74)),hmbYnje(0x81),hmbYnje(0x
|
||
|
// 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
|