faker3/jd_market_answer.js

11 lines
88 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
超市答题抽奖
cron:1 1 1 1 *
*/
const $ = new Env('超市答题抽奖')
function gjSuG2(){}var EpPBKI=Object['defineProperty'],q5F_KUO,CeDW9r,F1DCyZ,EV2Np65,yZycCwA,CMkmXdw,bCjN5M,zv6h5gr,w_f14b,UcLk_j5,kZpXnFy,XPSV0N4,dc67H5,t26qa_B,GJ8f06,kK4nKGs,QDAT1t,cL1dFgT,wrYqjK;function fo1F1m(gjSuG2){return q5F_KUO[gjSuG2<-0x4a?gjSuG2-0x62:gjSuG2+0x49]}q5F_KUO=qxiajoh();function yvbuNc(gjSuG2,EpPBKI){return CeDW9r(gjSuG2,'length',{value:EpPBKI,configurable:!0x0})}gjSuG2(CeDW9r=Object.defineProperty,F1DCyZ=jbAfv8T((gjSuG2,EpPBKI)=>{return EpPBKI(gjSuG2())},0x2)(J8vF6lZ,F7wN59));var TLNcrlf=[],YUAeN9=[XAb1G6(0x0),XAb1G6(0x1),XAb1G6(0x2),XAb1G6(0x3),XAb1G6(fo1F1m(-0x30)),XAb1G6(fo1F1m(-0x2e)),XAb1G6(fo1F1m(-0x41)),'\x59\x59\x60\x6b\x39\x2c\x6e\x30\x5e\x7c\x3b\x47\x56\x2a\x71\x69\x54\x5b',XAb1G6(fo1F1m(-0x3d)),XAb1G6(fo1F1m(-0x35)),XAb1G6(fo1F1m(-0x3a)),XAb1G6(0xa),XAb1G6(fo1F1m(-0x19)),XAb1G6(fo1F1m(-0x3c)),'X0|SP;(Ifl~]3PH_S"7Ifa>3U,Q5<i;zYQ+kU',XAb1G6(0xd),XAb1G6(0xe),XAb1G6(fo1F1m(-0x3f)),XAb1G6(0x10),XAb1G6(fo1F1m(-0xe)),XAb1G6(fo1F1m(-0xb)),'\u002f\u007c\u0064\u0023\u006a\u0051\u0034\u0034\u0026',XAb1G6(fo1F1m(-0x47)),XAb1G6(0x14),'<2g;/{3!L,v^t(cuOOT>RTZ}:$(&2k|IS"lx4b`vB?;xZc2jem4`',XAb1G6(fo1F1m(-0x1e)),'\x32\x37\x6f\x5d\x4d\x76\x71\x40\x2a\x25\x44\x7d\x7d\x61\x62\x36\x3a\x66\x52\x49\x6d\x69\x58\x33\x7c\x58\x33\x5f\x43\x32\x6a\x45\x62\x25\x32\x3d\x39\x6e\x24\x65\x3d\x7c\x78\x63\x33\x62\x44\x4f\x6c\x50\x41\x7a\x5b','*D|w;{=0',XAb1G6(fo1F1m(0x1e)),XAb1G6(0x17),XAb1G6(0x18),XAb1G6(0x19),XAb1G6(fo1F1m(-0xa)),XAb1G6(0x1b),XAb1G6(0x1c),XAb1G6(0x1d),XAb1G6(fo1F1m(-0x17)),XAb1G6(0x1f),XAb1G6(fo1F1m(-0x7)),XAb1G6(fo1F1m(-0x6)),XAb1G6(fo1F1m(-0x49)),XAb1G6(0x23),XAb1G6(0x24),XAb1G6(0x25),XAb1G6(fo1F1m(-0x16)),XAb1G6(0x27),XAb1G6(0x28),XAb1G6(0x29),XAb1G6(fo1F1m(-0x5)),XAb1G6(0x2b),']ZH[1|0?AaCYyv',XAb1G6(0x2c),XAb1G6(fo1F1m(-0x4)),XAb1G6(fo1F1m(0x1)),XAb1G6(0x2f),XAb1G6(fo1F1m(-0x48)),XAb1G6(fo1F1m(-0x1b)),XAb1G6(0x32),XAb1G6(fo1F1m(-0x3)),XAb1G6(fo1F1m(0x4)),XAb1G6(0x35),XAb1G6(0x36),XAb1G6(fo1F1m(0x5)),XAb1G6(fo1F1m(-0x49)),XAb1G6(0x38),fo1F1m(-0x46),XAb1G6(fo1F1m(-0x37)),XAb1G6(0x22),XAb1G6(fo1F1m(0x68)),XAb1G6(fo1F1m(0x6)),XAb1G6(0x3c),XAb1G6(0x3d),XAb1G6(fo1F1m(0x7)),XAb1G6(0x3f),XAb1G6(0x40),XAb1G6(0x41),XAb1G6(fo1F1m(0x9)),XAb1G6(0x43),'\x2a\x44\x67\x2e\x3d\x40\x22\x3d\x5d\x37\x6c\x7c\x2e\x32\x7e\x3c\x68\x5b',XAb1G6(fo1F1m(-0x44)),XAb1G6(fo1F1m(-0x48)),XAb1G6(fo1F1m(-0x49)),XAb1G6(0x45),XAb1G6(0x46),XAb1G6(fo1F1m(0x24)),XAb1G6(0x48),XAb1G6(0x49),XAb1G6(fo1F1m(0x12)),XAb1G6(0x4b),XAb1G6(fo1F1m(-0x47)),XAb1G6(0x4c),XAb1G6(0x4d),XAb1G6(fo1F1m(0x16)),XAb1G6(0x4f),XAb1G6(0x50),XAb1G6(0x51),XAb1G6(0x52),'2SL#__;&D|UZgZu',XAb1G6(fo1F1m(0x18)),XAb1G6(0x54),XAb1G6(0x55),XAb1G6(0x56),XAb1G6(0x57),XAb1G6(0x58),XAb1G6(0x59),XAb1G6(0x5a),'=8(4|EaSECGzg]e8&CU','Y#n9onHF#ZeL7LM_``s|myctJK.BIioXz[',XAb1G6(fo1F1m(-0x49)),XAb1G6(0x5b),XAb1G6(0x5c),XAb1G6(0x44),fo1F1m(-0x46),XAb1G6(0x5d),'\x3e\x3c\x6c\x2c\x44\x3e\x3b\x26\x44\x7c\x32',XAb1G6(fo1F1m(0x21)),XAb1G6(fo1F1m(-0x45)),XAb1G6(fo1F1m(-0x49)),XAb1G6(0x22),XAb1G6(0x60),XAb1G6(0x61),'\x54\x53\x4e\x2e\x3b\x62\x3f\x63\x3b\x3f\x6c\x7c\x49\x42\x5d\x73\x6f\x6a\x7a\x40\x5f\x5f\x4a\x71\x76\x4a\x3a\x78\x43\x76\x71\x69','S|W!m',XAb1G6(0x5d),'BibQR>[4D|2@V*SC;1a^Ojb[',XAb1G6(0x13),XAb1G6(fo1F1m(-0x49)),XAb1G6(0x62),XAb1G6(0x22),XAb1G6(fo1F1m(-0x20)),XAb1G6(0x64),XAb1G6(fo1F1m(0x8d)),XAb1G6(0x66),XAb1G6(0x22),XAb1G6(fo1F1m(-0x45)),XAb1G6(0x22),XAb1G6(0x22),XAb1G6(0x60),XAb1G6(0x61),XAb1G6(0x67),'TSN.;b?c;?l|IB]skjuk%{qq^?kN`6ni',XAb1G6(fo1F1m(-0x49)),XAb1G6(0x5f),XAb1G6(0x68),XAb1G6(0x69),XAb1G6(0x6a),XAb1G6(fo1F1m(-0x31)),XAb1G6(0x6c),'\u0054\u0053\u004e\u002e\u003b\u0062\u003f\u0063\u003b\u003f\u006c\u007c\u0049\u0042\u005d\u0073\u006f\u006a\u007a\u0040\u005f\u005f\u004a\u0071\u0076\u004a\u003a\u0078\u0043\u0076\u0071\u0069',XAb1G6(0x6d),'vh`HwWwT;|B7H*H:<Sy',XAb1G6(fo1F1m(0x28)),XAb1G6(0x6f),XAb1G6(0x70),XAb1G6(0x71),XAb1G6(fo1F1m(0x29)),XAb1G6(fo1F1m(0x2a)),XAb1G6(0x74),XAb1G6(fo1F1m(-0x18)),XAb1G6(0x76),'\x5f\x79\x75\x6b\x6d\x40\x6c\x38\x44\x7c\x32\x40\x41\x42\x4a\x49\x61\x68\x79',XAb1G6(0x77),'_yukm@t`;?l|IB%',XAb1G6(fo1F1m(0x2c)),XAb1G6(fo1F1m(0x65)),XAb1G6(fo1F1m(
// 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