faker3/jd_market_answer.js

11 lines
72 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
超市答题抽奖
2024-12-19 16:36:08 +08:00
cron:8 18 * * *
2024-11-12 11:17:55 +08:00
*/
const $ = new Env('超市答题抽奖')
2024-12-31 22:05:18 +08:00
function AZTFa9w(){}var H0gRIQh=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],IJGDi8K,hgmRhZG,wHBSXJG,VWvpa_I,mFu7Zyy,zOOYiA,qxeHnQ,vAeETXL,ieTYYT,aolZN2,SW_COh,lKCCKnj,BOV47ts,Zisc97,m2MXHA,QPsYt6U,KKxdpU,U3OWfn,hKbU7e;function JRJguSm(AZTFa9w){return IJGDi8K[AZTFa9w>0x5f?AZTFa9w-0x60:AZTFa9w-0x3c]}AZTFa9w(IJGDi8K=VQusgPZ(),hgmRhZG=CXbCPL((AZTFa9w,H0gRIQh)=>{return H0gRIQh(AZTFa9w())},0x2)(y10KOus,lJyFS_));var yY8Xkb=[],j3Zqmi=['\u0065\u0067\u004a\u004e\u0023\u004c\u0032\u0045','\x33\x2c\x40\x5d\x7b\x3c\x6f\x43','\u006e\u0052\u002c\u0061\u0022\u005d\u0071\u0076','\u002a\u0041\u007d\u007c\u007c\u0053\u0070','\u0071\u002f\u0060\u0075\u0055\u0073\u003c\u002e\u006f\u0060\u007c\u0035\u0076\u0026\u006f','\x4d\x4d\x71\x35\x5a\x6d\x72\x4e\x69\x5d\x45\x34\x5f\x3f\x2c\x5b\x56\x43','\x25\x5a\x45\x69\x77','\u006b\u004d\u0055\u0032\u002b','\x43\x61\x7b\x63','\x5b\x3f\x28\x63\x4c\x2a\x71\x4e','\u005a\u0068\u0052\u0063','\x4e\x61\x45\x4c\x4f','tN]sbE;j/+G".b*|s3Kj/P{.OmLkv[E1MLd5O','\u0073\u0034\u0036\u0063\u0077','\x3a\x73\x44\x69\x63\x46\x31\x7d\x5b\x60\x6b\x3b\x24\x2a\x40\x55\x3f\x5d\x28\x21\x6b\x5b\x4e\x71\x4c\x44\x2a\x33\x79\x5e\x5e\x30\x43\x61\x6e\x6d\x77\x2a\x2c\x2c\x69\x55\x35\x39\x71\x79\x72\x5b\x40\x2b\x54\x6d\x54\x6d\x6f','\u0047\u004d\u0072\u006d\u0032\u007c\u003f\u004e','\x57\x41\x52\x63','xOeWTpu(ldaI783{qq?]:?[&4+8VO)|^iXYb>*fa0}Wb[3OnUR>f',Ihy0RJx(JRJguSm(0x60)),'\x51\x7e\x4c\x6c\x29\x2a\x42\x5a\x7a\x5b\x66\x32\x32\x24\x7d\x6e\x4e\x4f\x28\x54\x41\x69\x64\x35\x2b\x64\x35\x68\x49\x51\x45\x7c\x7d\x5b\x51\x44\x5f\x52\x46\x58\x44\x2b\x6f\x38\x35\x7d\x66\x79\x2c\x3f\x77\x53\x3e','\x3f\x41\x5d\x68\x45\x23\x36\x4e',Ihy0RJx(JRJguSm(0x6c)),Ihy0RJx(0x2),'\x52\x2a\x42\x64\x47\x6f\x36',Ihy0RJx(0x3),'\x5a\x7c\x6f\x67\x41\x72\x5e\x24\x24\x62',Ihy0RJx(0x4),'\u0073\u0061\u005a\u0034\u005d\u0058\u0059\u0078','\u0048\u004d\u0065\u004c\u002c\u0074\u006f',Ihy0RJx(0x5),'\x33\x3b\x3e\x35\x6d\x7c\x72\x4e',Ihy0RJx(0x6),Ihy0RJx(JRJguSm(0x68)),'\x36\x77\x60\x76','lH.w','\u007b\u0076\u002b\u006d\u0041\u007b\u006f','\u0051\u0061\u0042\u0063\u0035\u0032\u003d\u004e','\u002c\u002a\u0034\u0030','\x30\x28\x64\x5e\x45','\u0043\u0054\u005b\u0051\u0055',Ihy0RJx(JRJguSm(0x6e)),'\x7b\x74\x67\x76\x22\x6f\x46\x70\x4a\x60\x25\x4c\x3f\x2e\x7e\x2b\x7b\x74\x67\x76\x22\x6f\x46\x70\x4a\x60\x25\x4c\x3f\x2e\x7e\x2b\x7b\x74\x67\x76\x22\x6f\x46\x70\x4a\x60\x25\x4c\x3f\x2e\x7e\x2b\x6d\x29','\u0047\u002a\u0046\u0032\u0023\u006c\u004c\u0068\u007c\u0037\u0031\u006a\u0043\u0077',Ihy0RJx(0x9),'\x3a\x77\x21\x30\x6d','HMJLk*:ef`YnC',Ihy0RJx(0xa),'\x2b\x54\x66\x69\x3f','\x7a\x78\x34\x6d\x3a\x38\x6f','\x57\x41\x68\x35\x30\x7b\x71\x4e',Ihy0RJx(JRJguSm(0x76)),Ihy0RJx(JRJguSm(0x6a)),'HMDiO2zn>Bh8?^!F6C','OA9cV*z{Q','HcoD','\u0065\u004c\u0036\u0063\u0026\u0073\u0035\u007c\u0051','\x56\x73\x39\x63\x45\x4a\x55\x75\x45\x55\x2b\x5d\x6a\x5e\x22\x30\x77\x54\x31\x37\x7c\x7c\x42\x2c\x3e\x42\x3a\x60\x57\x3e\x2c\x5b','\u0077\u0041\u003b\u004c\u003a\u0034\u0055\u0075\u0051',Ihy0RJx(JRJguSm(0x60)),'\u0046\u0041\u0056\u0059\u0073\u0064\u0025\u007d\u0044\u0065\u0071\u0060\u006a\u005e\u0079\u0057\u0024\u005a\u0031\u0037\u007c\u007c\u0042\u002c\u003e\u0042\u0041\u0033\u0079\u0039\u007d\u005b','\u0046\u005b\u0054\u006d\u004c\u002a\u0057\u0065\u006e\u0042\u0035\u005d\u0069\u0050',Ihy0RJx(0xd),'.xJLksBV?r+@:9%?YhDi','\u003f\u0041\u0067\u0063\u0036\u0037\u0033\u0036\u0022\u004b\u002b\u005d\u0063\u0028\u0047\u0076\u006c\u0043',Ihy0RJx(JRJguSm(0x6d)),Ihy0RJx(0x0),'\x21\x7c\x74\x3a\x26\x4c\x6d\x3d\x51\x36\x5a\x59\x23\x3b\x3a\x7c\x4d\x40\x5e\x5d\x77\x55\x50\x22\x40\x3f\x4b\x75\x62\x2c\x31\x33\x4b\x43','\x28\x73\x6e\x49\x7c\x7c\x45\x70\x41\x5d\x4f\x21\x67\x21\x53','\u0028\u0073\u006e\u0049\u007c\u007c\u0045\u0070\u0041\u005d\u0022','\x77\x54\x31\x37\x7c\x7c\x42\x2c\x3a\x65',JRJguSm(0x61),Ihy0RJx(JRJguSm(0x62)),'\u0047\u004d\u0072\u006d\u0032\u007c\u003f\u004e',JRJguSm(0x65),Ihy0RJx(0x10),'\u0024\u004e\u005f\u0056\u003b\u0069\u0032\u0045\u006d','\x66\x4d\x78\x77\x50\x59\x25\x43','\u0044\u004a\u0070\u006e\u0067\u0042\u007d\u0071',JRJguSm(0x61),Ihy0RJx(JRJguSm
2024-11-12 11:17:55 +08:00
// 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