faker3/jd_qrj_draw.js

14 lines
141 KiB
JavaScript
Raw Normal View History

2025-02-13 18:05:59 +08:00
/*
活动名称2.15 情人节拆礼物抽奖
活动变量jd_qrj_task //是否做任务获取次数,默认开启
cron:59 23 29 2 *
*/
const $ = new Env('2.15 情人节拆礼物抽奖')
function RV1F0W(){}var q2QDCHf=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],x4NZPz,bcA7Oe_,UrdZ4vb,V0tyVk8,OoXFNuk,tJ4XI2,PhQZEf,N5ELwuW,dmvQCy,e87til,Vy09jA,D2eWkd,_GYW99,Yd59Jdy,wcyTGz8,M1e4pbj,XVxHry0,a4YyPf,cYse54,HinDlaE;function z1gz9R(RV1F0W){return x4NZPz[RV1F0W<0x6?RV1F0W+0x63:RV1F0W<0x6?RV1F0W+0x4e:RV1F0W>0xd4?RV1F0W+0x7:RV1F0W-0x7]}RV1F0W(x4NZPz=Iri9ay5(),bcA7Oe_=p9Yiyyd((RV1F0W,q2QDCHf)=>{return q2QDCHf(RV1F0W())},0x2)(UzJ0Ijv,ROYNvI));var fQBag6=[],UAbSN2Y=[RlX7pWQ(z1gz9R(0x2d)),RlX7pWQ(z1gz9R(0x38)),RlX7pWQ(z1gz9R(0x3a)),'!gsQU{?B','\x39\x5b\x6b\x22\x2e',RlX7pWQ(0x3),'\x73\x75\x7b\x56\x4e\x59\x21\x72\x24\x41\x43\x70\x54\x2b\x60\x50','\x47\x67\x7c\x3c\x40',RlX7pWQ(z1gz9R(0x8d)),RlX7pWQ(z1gz9R(0x33)),'\u0073\u0075\u007b\u0056\u004e\u0059\u0021\u0072\u0077\u003f\u006a\u0033\u0073\u004b\u0054','su{VNY!r)J{M6W)scWx',RlX7pWQ(0x6),'\u0073\u0075\u007b\u0056\u004e\u0059\u0021\u0072\u0041\u004a\u0071\u003d\u0061\u006e\u0065\u003b\u0037\u0026\u0067\u003c\u0056','g~^qu','\u0073\u0075\u007b\u0056\u004e\u0059\u0021\u0072\u0050\u0033\u0068\u002b\u0033\u0071',RlX7pWQ(0x7),RlX7pWQ(z1gz9R(0x35)),RlX7pWQ(z1gz9R(0x34)),RlX7pWQ(z1gz9R(0x3b)),RlX7pWQ(z1gz9R(0x3c)),RlX7pWQ(z1gz9R(0x30)),';m/(<$>B',RlX7pWQ(z1gz9R(0x23)),'\u0042\u0071\u006b\u003c\u0040','\u007e\u0042\u0033\u0026\u0044\u006b\u0067\u0050\u0062\u005a\u0031\u0079\u0047\u0044\u0024\u007b\u0026\u0021\u0074\u0050\u0062\u006f\u0059\u0047\u0040\u0055\u003c\u0023\u0037\u003b\u006b\u0076\u0057\u003c\u0046\u0051\u0040','\u0026\u0043\u0068\u0028\u002e',RlX7pWQ(z1gz9R(0x13)),RlX7pWQ(0xf),RlX7pWQ(z1gz9R(0x36)),'md3_k)hB',RlX7pWQ(z1gz9R(0x3d)),'\x6a\x75\x35\x24\x7d\x4d\x70\x2a',z1gz9R(0x1b),'VWCU#%VlMty','\x7d\x5f\x6e\x7a\x57\x3a\x40\x7c\x7c\x4a','\u0063\u0057\u0043\u0055\u0023\u0025\u0056\u006c\u004d\u0074\u007e\u0051\u006d\u004d\u006d\u0077\u0022\u0061','~&}]L)sB',RlX7pWQ(0x12),RlX7pWQ(0x13),RlX7pWQ(z1gz9R(0x32)),'\x4b\x3b\x5b\x3c\x25\x7b\x39\x35\x5f\x6c\x31\x41\x77\x71','fbr;c$Q*','\u0068\u0070\u003d\u0049\u0050\u005b\u0076\u0050','gnJI[',RlX7pWQ(z1gz9R(0x3e)),'\u0026\u006c\u007b\u003b\u0079\u0024\u0026\u0072\u0073\u0072\u0025\u005a\u0064\u0054\u0045\u0074','\x41\x62\x59\x57\x70','\u0038\u0078\u0043\u0055\u0048\u0070\u002c',RlX7pWQ(z1gz9R(0x3f)),'\u003b\u006d\u0065\u003c\u003f\u0036\u0061\u007a\u0058',RlX7pWQ(0x17),RlX7pWQ(z1gz9R(0x40)),'+Ct6Y{,','\u004d\u003b\u0047\u003c\u0039\u007b\u0034\u007d\u003d\u0074\u006a\u002b\u0030\u0047\u007c\u0073\u0069\u004c\u0023\u0051\u006b\u0029\u0021\u0056\u006a\u0074\u0043\u0070\u0061',RlX7pWQ(0x19),'Lq@Bd[hmz','\x6f\x39\x6b\x29\x3e\x32\x44\x6b\x6e\x4d','FEe<46/B',RlX7pWQ(z1gz9R(0x41)),RlX7pWQ(0x1b),'\u002e\u0057\u0023\u003a\u0048\u0035\u002c',RlX7pWQ(z1gz9R(0x42)),'\x40\x64\x2b\x28\x56\x24\x38\x59\x45',z1gz9R(0x7),RlX7pWQ(0x1d),'\x6b\x71\x68\x28\x2e','\u007e\u003f\u0041\u003d\u0036\u006d\u0074\u0053\u003b\u0044\u002f\u005b\u003a\u0041\u0031\u002c\u005d\u0066\u0046\u003d\u0056',RlX7pWQ(0x1e),'\x51\x45\x38\x58\x23\x6d\x78\x79','\x5d\x71\x49\x55\x6a\x5b\x29\x68\x58\x6c\x79',RlX7pWQ(0x1f),RlX7pWQ(0x20),'\x72\x67\x32\x58\x32\x59\x76\x34\x37\x33\x75\x76\x51\x78\x37\x2c',RlX7pWQ(0x21),'\x72\x67\x32\x58\x64\x75\x25\x31\x73\x7c\x3e\x50\x6d\x32\x32\x53\x4f\x61','\u0072\u0067\u0032\u0058\u003b\u007e\u0068\u006d\u007e\u0044\u006d\u005e\u0066\u007e\u0037','\u0038\u0078\u006c\u0028\u006a\u0059\u003d\u0077\u003d\u002a\u0045\u003d\u0078\u0079\u0067\u004f\u0025\u0048\u0078',z1gz9R(0x27),RlX7pWQ(0x22),'\x3e\x33\x76\x75\x59\x3e\x7b\x76\x66\x38\x59\x76\x61','Vi.E5&jAp>IM*iF:#uB',RlX7pWQ(z1gz9R(0x46)),RlX7pWQ(0x24),'\u007e\u003f\u0064\u0072\u0075\u006f\u0034\u0034\u0078\u0038',RlX7pWQ(0x25),z1gz9R(0x9),RlX7pWQ(0x26),'\x46\x5b\x44\x21\x49\x50\x4a\x76\x36\x53\x50\x4f\x25\x50\x76\x5a\x5b\x75\x42',RlX7pWQ(0x27),RlX7pWQ(0x28),RlX7pWQ(0x29),'hJCHkm#O.(L;Y~k',z1gz9R(0xa),RlX7pWQ(z1gz9R(0x49)),RlX7pWQ(0x2b),RlX7pWQ(0x2c),'\u0072\u0067\u0032\u0058\u0024\u002a\u003c\u0021\u0026\u0028\u003e\u002e\u0061',RlX7pWQ(0x2d),'\x62\x37\x60\x5d\x6b\x38\x57\x75\x74\x41\x38\x2c\x49\x38\x75\x7c\x37\x68\x6f',z1gz9R(0x8),z1gz9R(0x7),RlX7pWQ(0x2e),z1gz9R(0x26),z1gz9R
// 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