faker3/jd_opencard_1120.js

16 lines
80 KiB
JavaScript
Raw Normal View History

2024-11-21 14:54:16 +08:00
/*
环境变量
export jd_opencard_draw="3" //抽奖次数 3
export jd_opencard_notify="true" // 是否推送
cron:1 1 1 1 *
*/
const $ = new Env('10.25 呵护备至 相伴过暖')
function fkFcuVn(){}var Vvj9_aK=Object['defineProperty'],sQ6NLuA,aLpgtIH,liB0yek,gFBpebH,QqlUf63,PrikrNt,yBSyD2,bPrFtS,ZtcbQq,m_hHmh,pChTXZF,Y6uQQO,rvvme6,dlmmzF,rtDnyy,xwDQvpn;function _74SDs(fkFcuVn){return sQ6NLuA[fkFcuVn>0x44?fkFcuVn>0x10c?fkFcuVn-0x31:fkFcuVn-0x45:fkFcuVn+0x28]}sQ6NLuA=ESpKhtx();function s6NcBO(fkFcuVn,Vvj9_aK){aLpgtIH(fkFcuVn,_74SDs(0x54),{value:Vvj9_aK,configurable:!0x0});return fkFcuVn}fkFcuVn(aLpgtIH=Object.defineProperty,liB0yek=HhKDrNP((fkFcuVn,Vvj9_aK)=>{return Vvj9_aK(fkFcuVn())},0x2)(Gbyog3h,vzF6x4));var uypoA8O=[],ZNFI42=[oLF1O5(0x0),oLF1O5(_74SDs(0x51)),oLF1O5(0x2),'|JaY',oLF1O5(_74SDs(0x5c)),oLF1O5(0x4),'7kmoc~:G@$/xgtldcH|Y',oLF1O5(_74SDs(0x6b)),oLF1O5(0x6),oLF1O5(_74SDs(0x59)),oLF1O5(_74SDs(0x63)),'\x34\x4b\x3d\x4e\x60\x3f\x23\x7b\x69\x24\x7c\x29\x4f',oLF1O5(0x9),oLF1O5(0xa),'\x7c\x4c\x25\x79\x67\x72\x53\x7a\x3a\x3b\x4b\x35\x74\x67\x51\x71\x79\x52\x57\x7a\x3a\x62\x4f',oLF1O5(_74SDs(0xe1)),oLF1O5(0xc),oLF1O5(_74SDs(0x45)),oLF1O5(0xe),oLF1O5(_74SDs(0x56)),oLF1O5(_74SDs(0x6e)),oLF1O5(_74SDs(0x71)),oLF1O5(_74SDs(0x5a)),oLF1O5(0x13),oLF1O5(0x14),oLF1O5(0x15),oLF1O5(0x16),oLF1O5(0x17),oLF1O5(0x18),oLF1O5(0x19),oLF1O5(_74SDs(0x72)),oLF1O5(_74SDs(0x76)),oLF1O5(0x1c),oLF1O5(0x1d),oLF1O5(_74SDs(0x77)),oLF1O5(0x1f),oLF1O5(0x20),oLF1O5(0x21),oLF1O5(0x15),oLF1O5(0x22),oLF1O5(_74SDs(0x78)),oLF1O5(_74SDs(0x70)),'\u0054\u0066\u0042\u006a\u0075\u002f\u0058\u0073\u002a\u0057\u007c\u0028\u006c\u002a\u006c\u005f\u0059\u004f','|ydAnw7L','Tf8V#|+',oLF1O5(_74SDs(0x79)),oLF1O5(0x26),oLF1O5(_74SDs(0x7d)),'4G`|QXE&&s',oLF1O5(0x28),oLF1O5(_74SDs(0xad)),oLF1O5(0x2a),oLF1O5(_74SDs(0xac)),oLF1O5(0x2c),oLF1O5(0x2d),oLF1O5(_74SDs(0x47)),oLF1O5(0x2f),oLF1O5(0x30),oLF1O5(_74SDs(0x7b)),oLF1O5(_74SDs(0x7f)),'|JoApw<Xc',oLF1O5(0x33),oLF1O5(0x34),oLF1O5(_74SDs(0x4f)),oLF1O5(0x36),'*X|opej[Nd_~aH!)HwmBUeJu]@p]15usYH@7:n5i6?I}M',oLF1O5(_74SDs(0x46)),oLF1O5(0x37),'DzD1i02|@&',oLF1O5(0x38),oLF1O5(0x39),oLF1O5(0x3a),oLF1O5(0x3b),'\u0025\u0056\u005d\u0026\u0072\u007c\u002c\u004d',oLF1O5(_74SDs(0x91)),oLF1O5(_74SDs(0xa6)),oLF1O5(0xd),oLF1O5(0x3e),oLF1O5(0x3f),oLF1O5(_74SDs(0x8c)),oLF1O5(0xd),oLF1O5(_74SDs(0x8d)),oLF1O5(0x42),oLF1O5(_74SDs(0x4b)),oLF1O5(0x44),oLF1O5(0x45),oLF1O5(0x46),'\x7c\x4b\x51\x66\x59\x4e\x53\x4d',oLF1O5(_74SDs(0xa3)),oLF1O5(0x48),oLF1O5(_74SDs(0x6c)),oLF1O5(0x4a),oLF1O5(0x4b),oLF1O5(0x4c),oLF1O5(0x4d),oLF1O5(0x4e),oLF1O5(_74SDs(0x92)),oLF1O5(_74SDs(0x8f)),oLF1O5(0x51),oLF1O5(_74SDs(0x94)),oLF1O5(0x53),oLF1O5(_74SDs(0x96)),oLF1O5(_74SDs(0x66)),oLF1O5(_74SDs(0x99)),oLF1O5(0x57),oLF1O5(0x58),oLF1O5(_74SDs(0x9b)),oLF1O5(0x5a),oLF1O5(0x5b),oLF1O5(_74SDs(0x9d)),oLF1O5(0x5d),oLF1O5(0x5e),oLF1O5(0x5f),oLF1O5(0x60),oLF1O5(_74SDs(0x9f)),oLF1O5(0x62),oLF1O5(0x63),oLF1O5(0x64),oLF1O5(0x65),oLF1O5(_74SDs(0x45)),oLF1O5(_74SDs(0x6d)),oLF1O5(_74SDs(0x45)),oLF1O5(_74SDs(0x46)),oLF1O5(_74SDs(0xa0)),'S|1H',oLF1O5(0x68),oLF1O5(0x35),oLF1O5(0x69),oLF1O5(0x26),oLF1O5(0xd),oLF1O5(0xd),oLF1O5(0x6a),oLF1O5(_74SDs(0x4a)),oLF1O5(0x69),oLF1O5(_74SDs(0x8b)),oLF1O5(_74SDs(0xa4)),oLF1O5(_74SDs(0xa7)),oLF1O5(0x3f),'|JoApw<Xc',oLF1O5(_74SDs(0xa5)),'"|aiW37q',oLF1O5(0x6f),oLF1O5(0x70),oLF1O5(0x71),'\u007b\u007c\u0061\u0069\u0074\u003d\u0060\u004b\u0042',oLF1O5(_74SDs(0xae)),oLF1O5(0x73),oLF1O5(0xd),oLF1O5(0x74),'"|ai>',oLF1O5(_74SDs(0x46)),oLF1O5(_74SDs(0xaf)),oLF1O5(_74SDs(0x45)),oLF1O5(0x76),oLF1O5(_74SDs(0x5f)),'.q|aoz^X<w}',oLF1O5(0x78),oLF1O5(0x79),oLF1O5(0x7a),oLF1O5(0x7b),oLF1O5(0x37),oLF1O5(0x7c),oLF1O5(_74SDs(0x45)),oLF1O5(0x7d),oLF1O5(0x6b),oLF1O5(0x7e),oLF1O5(0x7f),oLF1O5(0x80),oLF1O5(0x69),oLF1O5(_74SDs(0x47)),oLF1O5(_74SDs(0x47)),oLF1O5(_74SDs(0x45)),oLF1O5(0x81),oLF1O5(_74SDs(0xb8)),oLF1O5(_74SDs(0x46)),oLF1O5(_74SDs(0x45)),oLF1O5(_74SDs(0x45)),oLF1O5(_74SDs(0x49)),oLF1O5(_74SDs(0xb9)),oLF1O5(0x4a),oLF1O5(_74SDs(0x50)),oLF1O5(0x84),oLF1O5(_74SDs(0xbb)),oLF1O5(_74SDs(0x47)),oLF1O5(0x80),oLF1O5(0x26),oLF1O5(_74SDs(0xbc)),oLF1O5(_74SDs(0xc0)),oLF1O5(0x88),oLF1O5(0x89),oLF1O5(_74SDs(0xbe)),oLF1O5(0x8b),oLF1O5(_74SDs(0xc1)),oLF1O5(0x1b),oLF1O5(_74SDs(0xc2)),oLF1O5(0x8e),oLF1O5(0x26),oLF1O5(0x85),oLF1O5(0x2e),oLF1O5(0x79),oLF1O5(0x8
// 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