faker3/jd_qfz_draw.js

14 lines
152 KiB
JavaScript
Raw Permalink Normal View History

2025-01-06 19:06:27 +08:00
/*
活动名称1.22 敲福字抽奖
活动变量jd_qfz_task //是否做任务获取次数,默认开启
cron:19 16 31,1-22 12,1 * jd_qfz_draw.js
*/
const $ = new Env('1.22 敲福字抽奖')
function m5vVDfS(){}var y4Na0S=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],dAAA16,g_BB4O,Oyy15e,x2Y9JE,_IX0CC,l19tsDr,mWaznng,A7yUn9l,m2g8y1F,Vdohs8,eZ567j,XcOj4D,hbhVBrc,As1MDm,s2Iiah,LD1nPXF,FuvtWr,L9XeVQ,qXjWLF,Kye8o2,BCtobh,T0_GFN;function zYa_6c(m5vVDfS){return dAAA16[m5vVDfS<0x39?m5vVDfS+0x3b:m5vVDfS>0x10a?m5vVDfS+0x11:m5vVDfS-0x3a]}m5vVDfS(dAAA16=Ux62GyR(),g_BB4O=wSXiDhN((m5vVDfS,y4Na0S)=>{return y4Na0S(m5vVDfS())},0x2)(ORTWt9,x9Tx_rE));var jbcA8i=[],nOiIVGR=[uA7lYy1(0x0),uA7lYy1(zYa_6c(0x61)),'\u0063\u004d\u005e\u004c\u0071\u0079\u0030\u002f',uA7lYy1(0x2),'\u006b\u0044\u007d\u0043\u007c','\x79\x31\x34\x75\x24\x5a\x49\x28','\x64\x4a\x44\x4c\x4c\x2b\x36','\u0049\u0070\u0053\u0048\u006a\u003b\u0057\u002f\u0050\u0053\u004c\u007d\u0028\u0029\u0050','\x68\x68\x24\x5f\x43\x4f\x33\x75\x3d\x6b\x3b\x58\x4b\x78\x36\x7a\x50\x26',uA7lYy1(zYa_6c(0x5d)),'\u0037\u007a\u0063\u003d','\x4a\x61\x3e\x50\x21\x71\x2f\x4b\x32\x59\x58\x30\x57\x71\x65\x6f',uA7lYy1(zYa_6c(0x6c)),uA7lYy1(0x5),'Ja>P!q/K;e20#GZo',uA7lYy1(zYa_6c(0x59)),uA7lYy1(zYa_6c(0x63)),'\x4a\x61\x3e\x50\x21\x71\x2f\x4b\x59\x2b\x21\x3f\x26\x66\x22\x7b\x4a\x2c\x76','\u004a\u0061\u003e\u0050\u0021\u0071\u002f\u004b\u0059\u002b\u0021\u003f\u0026\u0066\u0054\u007a\u007b\u002c\u0072\u005a\u0050',uA7lYy1(zYa_6c(0x67)),uA7lYy1(0x9),'\u005e\u0076\u0021\u004f\u005f\u0032\u0035','\u0044\u0076\u0029\u0079\u0067\u007c\u003b\u0039\u0059\u003b\u006c\u0070\u0030\u0048\u007c\u0063\u0054\u007a\u0025\u0079\u003d\u0048\u0055\u0058\u0029\u0059\u007a',uA7lYy1(0xa),uA7lYy1(0xb),uA7lYy1(0xc),'\u0026\u0021\u0052\u002a',uA7lYy1(zYa_6c(0x5f)),zYa_6c(0x49),'u!;Zp','7uk,I;roN@%j~I2>,snoNwR~pOZ:{z;BhZ|_p','\x2c\x58\x22\x2a\x39',zYa_6c(0x3a),uA7lYy1(zYa_6c(0x6e)),'\x62\x68\x41\x3d\x48\x52\x60\x3f\x79\x73\x64\x30\x78\x47\x69\x60\x22\x26',uA7lYy1(zYa_6c(0x5a)),uA7lYy1(zYa_6c(0x6f)),uA7lYy1(0x11),'\x47\x7a\x50\x5f\x4c\x66\x35','\u0050\u0068\u0058\u004f\u003a\u003c\u0050\u0056\u0047\u006e\u006a',uA7lYy1(zYa_6c(0x5b)),'\x62\x68\x58\x4f\x3a\x3c\x50\x56\x47\x6e\x37\x5f\x78\x47\x78\x60\x3d\x26','\u0037\u002c\u0028\u0029\u0051\u0031\u004a\u0075','\u0062\u0068\u0054\u005a\u0036\u0037\u0035','\u0022\u0068\u0055\u004f\u007d\u0058\u0048\u0050\u005d','srJ_O>3u','\x7d\x78\x25\x4d\x57\x6d\x70\x53\x53\x2b','LzCZ<>[^dV%Y`!','\u0050\u0055\u0054\u005a\u006a\u004f\u0062\u0075',zYa_6c(0x3e),'bhFZ:2cTWemg&','\u002f\u0024\u0028\u005a\u0059\u004f\u002f\u0054\u0072\u0054\u0058\u0030\u0045\u0032\u005e\u007a',uA7lYy1(0x13),uA7lYy1(zYa_6c(0x72)),uA7lYy1(0x15),uA7lYy1(0x16),'\u0069\u0038\u0054\u005a\u0070','9h:mc^NRC+',uA7lYy1(zYa_6c(0x3d)),uA7lYy1(0x18),uA7lYy1(zYa_6c(0x73)),zYa_6c(0x4b),'\u0023\u0076\u0057\u003d\u007c\u0055\u006e\u0057\u0043\u0051','\x7c\x5d\x54\x5a\x34\x4d\x7d\x75','\u0060\u0039\u0054\u005a\u0034\u004d\u007d\u0075','\x46\x72\x2f\x4d\x65\x4f\x6b\x53\x5d',uA7lYy1(0x1a),uA7lYy1(0x1b),'\x70\x38\x71\x2a\x50\x32\x23\x52\x5d',zYa_6c(0x3a),'Gz~Z[>4(?nyqH~SJqQ?M8RA?gVYg&',uA7lYy1(0x1c),'~M.D9<eF$X3{n.v+&oCDU',uA7lYy1(0x1d),uA7lYy1(zYa_6c(0x69)),uA7lYy1(0x1f),'\x2f\x24\x66\x39\x57\x3e\x5b\x2e\x3f\x6e\x7c\x30\x59\x47\x61','\u0029\u0021\u0055\u004f\u0079\u0043\u0055\u0075\u004d\u002b','\u0029\u0021\u0055\u004f\u0055\u0059\u0067\u0050\u0061\u006b\u006c\u0067\u0025\u0078\u0061\u004a',uA7lYy1(zYa_6c(0x76)),'\u0054\u004b\u0072\u0035\u0029\u007c\u005f\u0076\u0070\u004f\u0073\u0048\u003c\u0072\u0072\u0046\u0067\u0042','\u0054\u004b\u0072\u0035\u0024\u007e\u002f\u003c\u007e\u0058\u003c\u002c\u006f\u007e\u0030','#vV*yR?`?D]?vjri<cv','\u0053\u0056\u0072\u007d\u0072\u0042\u006b\u0040\u0044\u0026\u002b\u0042\u003c\u0022\u0072\u006f',uA7lYy1(0x21),'g(7nBg=7P&B7I','\x2c\x3b\x3c\x6a\x23\x6e\x79\x32\x66\x39\x5e\x7e\x3f\x3b\x71\x4a\x52\x2b\x4c','\u004d\u0061\u0043\u0053\u006e\u002e\u0045\u0045\u003b\u0026',uA7lYy1(0x22),uA7lYy1(zYa_6c(0x3c)),'\x77\x78\x34\x76\x33\x70\x4b\x77\x32\x51\x7c','\u005b\u007d\u0046\u007e\u0025\u0035\u006c\u0057\u0057\u0072','\u0077\u0078\u0026\u004c\u0034\u0043\u0070\u0046\u007e\u0051\u0043\u006f\u0061\u0043\u0046\u0067\u0078\u0031\u0030','\x37\x7d\x49\x7e\x4a\x70\x25\x2b',uA7lYy1(zYa_6c(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