mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
17 lines
134 KiB
JavaScript
17 lines
134 KiB
JavaScript
|
/*
|
|||
|
9.3-9.11 早秋尚新季 狂欢大促销
|
|||
|
|
|||
|
不会自动运行,请在有水的时候运行
|
|||
|
|
|||
|
//export jd_opencard_draw="3" //抽奖次数 3
|
|||
|
//export jd_opencard_break="true" //IP限制后继续执行(true/false)
|
|||
|
|
|||
|
cron "1 1 1 1 *" script-path=jd_opencard_0903.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('9.3-9.11 早秋尚新季 狂欢大促销')
|
|||
|
function ck4KXEo(){}var APLV1q_=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],H3GH5LU,PUueEwl,VoiSdT,mJhfA71,tznLjA,Cts398,da6fCg,CqKY7B,nwMGV1,jkEkalk,zohvTQ,NuhxsNr,ZTAGZNk,HgMAeEd,WymRtSU,PmmHpw,Ifg0dM,Lm1FQ4,iQakc1;function DWIxV66(ck4KXEo){return H3GH5LU[ck4KXEo>0x144?ck4KXEo+0x64:ck4KXEo>0x10?ck4KXEo<0x144?ck4KXEo<0x10?ck4KXEo+0x48:ck4KXEo-0x11:ck4KXEo-0x4c:ck4KXEo-0x22]}H3GH5LU=cEtQUv();function lQqVrpt(ck4KXEo,APLV1q_){return PUueEwl.call(DWIxV66(0x69),ck4KXEo,DWIxV66(0x35),{value:APLV1q_,configurable:DWIxV66(0x8c)})}ck4KXEo(PUueEwl=Object.defineProperty,VoiSdT=lQqVrpt(XJF2ir8((...APLV1q_)=>{var PUueEwl=XJF2ir8(APLV1q_=>{return H3GH5LU[APLV1q_>-0x12?APLV1q_>0x122?APLV1q_-0x14:APLV1q_+0x11:APLV1q_+0x9]},0x1);ck4KXEo(APLV1q_.length=DWIxV66(0x12),APLV1q_[DWIxV66(0x11)]=APLV1q_[0x0]);return APLV1q_[DWIxV66(0x38)](APLV1q_[PUueEwl(-0x11)]())}),DWIxV66(0x12))(jBfLUA9,hy4nxrx));var WTW6YXB=[],fwAhnAl=[arcvy8(0x0),arcvy8(0x1),arcvy8(0x2),arcvy8(DWIxV66(0x37)),arcvy8(DWIxV66(0x36)),arcvy8(DWIxV66(0x47)),arcvy8(0x6),'>|qx2Pc2',arcvy8(DWIxV66(0x11)),arcvy8(DWIxV66(0x51)),arcvy8(0x9),'22(w@0yPG/t|.$)F,b',arcvy8(0xa),arcvy8(DWIxV66(0x68)),arcvy8(0xc),arcvy8(0xd),arcvy8(0xe),arcvy8(DWIxV66(0x40)),arcvy8(0x10),arcvy8(0x11),arcvy8(DWIxV66(0x46)),arcvy8(DWIxV66(0x16)),arcvy8(0x13),arcvy8(DWIxV66(0x6d)),arcvy8(DWIxV66(0x6e)),arcvy8(0x16),arcvy8(0x17),arcvy8(0x18),arcvy8(0x19),arcvy8(DWIxV66(0x6f)),arcvy8(0x1b),'\u0041\u007c\u005f\u0054\u003b',arcvy8(0x1c),arcvy8(0x1d),arcvy8(0x1e),arcvy8(DWIxV66(0x67)),arcvy8(0x20),arcvy8(0x1d),arcvy8(0x21),arcvy8(0x22),'*Qc2|0^n',arcvy8(0x23),arcvy8(0x19),arcvy8(0x13),arcvy8(DWIxV66(0x18)),arcvy8(0x25),arcvy8(DWIxV66(0x17)),arcvy8(0x27),arcvy8(DWIxV66(0x1c)),arcvy8(0x29),arcvy8(DWIxV66(0x76)),arcvy8(0x2b),arcvy8(0x2c),arcvy8(DWIxV66(0x70)),arcvy8(DWIxV66(0x2d)),',2|0[D,WEi}',arcvy8(DWIxV66(0x77)),'Y2|0[D,WEinw$E$!Gb',arcvy8(DWIxV66(0x71)),arcvy8(0x30),arcvy8(DWIxV66(0x44)),'_230K|m,d',arcvy8(0x32),arcvy8(DWIxV66(0x2e)),arcvy8(DWIxV66(0xd8)),arcvy8(DWIxV66(0x15)),arcvy8(DWIxV66(0x7f)),arcvy8(DWIxV66(0x4e)),arcvy8(0x38),arcvy8(0x39),arcvy8(0x3a),arcvy8(DWIxV66(0x1e)),arcvy8(DWIxV66(0x2a)),'`O|0>=x',arcvy8(0x3d),arcvy8(0x3e),arcvy8(0x3f),arcvy8(DWIxV66(0x4f)),arcvy8(0x41),arcvy8(0x42),arcvy8(DWIxV66(0x20)),arcvy8(DWIxV66(0x1a)),arcvy8(DWIxV66(0x1b)),arcvy8(0x46),arcvy8(DWIxV66(0x13)),DWIxV66(0x14),'mgCpiCr:`|y:AdcgGu)4~Sb',arcvy8(DWIxV66(0x13)),DWIxV66(0x14),'\x6d\x67\x43\x70\x69\x43\x72\x3a\x60\x7c\x79\x3a\x41\x64\x63\x67\x47\x75\x29\x34\x7e\x53\x62',arcvy8(0x36),arcvy8(DWIxV66(0x15)),arcvy8(DWIxV66(0x13)),arcvy8(DWIxV66(0x83)),arcvy8(DWIxV66(0x19)),arcvy8(DWIxV66(0x13)),'\u0055\u0067\u0035\u004d\u005a\u002a\u002c\u0077\u007c\u0044\u005d\u002b\u0049\u0059\u0057\u007e\u0059\u0073\u0025\u0034\u0032\u002a\u0062',arcvy8(DWIxV66(0x49)),arcvy8(DWIxV66(0x84)),arcvy8(DWIxV66(0x16)),arcvy8(DWIxV66(0x85)),'"PS>N|.K',arcvy8(0x4c),arcvy8(DWIxV66(0x86)),arcvy8(0x4e),arcvy8(0x4f),arcvy8(0x50),'_nw|T+`A3FV',arcvy8(DWIxV66(0x13)),'#!HM^tk1u0kzbd[9(T|0q~x,EYw!jGLn?[>r.diK4U~hUI%gAhe<(TcMBw7RCs#+Eb',arcvy8(0x51),arcvy8(0x23),arcvy8(0x52),arcvy8(DWIxV66(0x8e)),'^Bt|U~VK',arcvy8(0x54),arcvy8(DWIxV66(0x142)),arcvy8(0x56),arcvy8(0x57),'s2Si}}|E',arcvy8(0x58),arcvy8(DWIxV66(0x74)),arcvy8(0x5a),arcvy8(DWIxV66(0x50)),arcvy8(0x23),'\x5f\x6e\x36\x29\x6c\x38\x7a\x2e\x29\x44\x7c\x5f\x51\x2a\x50',arcvy8(DWIxV66(0x8d)),arcvy8(0x5d),arcvy8(0x5e),arcvy8(DWIxV66(0x8f)),arcvy8(DWIxV66(0x17)),arcvy8(DWIxV66(0x90)),arcvy8(0x4c),arcvy8(0x61),'(T|0q~Nb',arcvy8(0x62),arcvy8(0x63),'xJr|<,UK',arcvy8(DWIxV66(0x91)),arcvy8(0x65),arcvy8(0x66),arcvy8(DWIxV66(0x92)),arcvy8(0x68),arcvy8(0x69),arcvy8(DWIxV66(0x26)),'Irt|^2UK',arcvy8(0x6b),arcvy8(0x6c),arcvy8(DWIxV66(0x64)),'\u0049\u0072\u0074\u007c\u0074\u005d\u0053\u003d\u006b\u0034\u0056',arcvy8(0x6e),arcvy8(0x6f),arcvy8(DWIxV66(0x94)),arcvy8(DWIxV66(0x1d)),arcvy8(0x72),arcvy8(DWIxV66(0x59)),arcvy8(DWIxV66(0x95)),arcvy8(DWIxV66(0x96)),arcvy8(DWIxV66(0x4a)),arcvy8(DWIxV66(0x24)),arcvy8(0x78),arcvy8(0x79),arcvy8(DWIxV66(0x48)),arcvy8(0x7b),arcvy8(0
|
|||
|
// 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
|