faker3/jd_opencard_0829.js

17 lines
82 KiB
JavaScript
Raw Normal View History

2024-08-30 14:52:13 +08:00
/*
7.29-9.4 清凉新思路 礼遇不凡
环境变量
export jd_opencard_draw="3" //抽奖次数 3
export jd_opencard_notify="true" // 是否推送
cron:1 1 1 1 *
*/
const $ = new Env('8.29-9.4 清凉新思路 礼遇“京”不凡')
function dyjVjni(){}var QuoqnU=Object['defineProperty'],i0uH6Mp,d1I221d,W0NliK,FLXeWG,dfp5Eh,lT5Ord,aPizx2U,yMnhXET,GPpZ7x,VdM1Ty5,dIGn18,otTHeNB,CZMlWM,Oe4MQP9,E2PZMX,PXdb6v;function AgGLeTN(dyjVjni){return i0uH6Mp[dyjVjni<0xb3?dyjVjni<-0x27?dyjVjni+0x23:dyjVjni>0xb3?dyjVjni+0x3d:dyjVjni<-0x27?dyjVjni+0x5b:dyjVjni+0x26:dyjVjni+0x50]}i0uH6Mp=nybskr();function gdPzH2(dyjVjni,QuoqnU){return d1I221d.call(AgGLeTN(0x44),dyjVjni,AgGLeTN(-0xf),{value:QuoqnU,configurable:AgGLeTN(0x23)})}dyjVjni(d1I221d=Object.defineProperty,W0NliK=gdPzH2(iyWznJp((...QuoqnU)=>{dyjVjni(QuoqnU.length=0x2,QuoqnU.ePdr4f=AgGLeTN(0x2d));return QuoqnU.ePdr4f>0x9a?QuoqnU[-0x90]:QuoqnU[0x1](QuoqnU[0x0]())}),0x2)(g7NK_sg,zok44Op));var bcQXNW=[],xeQyvN=[zSZnFr(AgGLeTN(-0xc)),zSZnFr(AgGLeTN(-0xd)),zSZnFr(0x2),zSZnFr(0x3),zSZnFr(0x4),zSZnFr(AgGLeTN(0x1)),zSZnFr(0x6),zSZnFr(AgGLeTN(-0x2)),zSZnFr(AgGLeTN(0x6)),zSZnFr(0x9),zSZnFr(0xa),zSZnFr(AgGLeTN(0xad)),zSZnFr(0xc),zSZnFr(0xd),zSZnFr(0xe),'4)o,{|GkdmR9b',zSZnFr(AgGLeTN(-0x4)),zSZnFr(0x10),'"D62/Nb%8fXP`/!c2|^%8vw',zSZnFr(0x11),zSZnFr(0x12),zSZnFr(AgGLeTN(-0x25)),zSZnFr(0x10),';]vK.Yx|IP49e:Cxkb',zSZnFr(0x14),zSZnFr(0x15),zSZnFr(0x16),zSZnFr(0x17),zSZnFr(0x18),zSZnFr(AgGLeTN(0x22)),zSZnFr(AgGLeTN(-0x17)),'t2+dQS1bdT7T{e[)fZ,F|{1ZB8c^pt$eb?g',zSZnFr(0x1b),zSZnFr(0x1c),zSZnFr(0x1d),zSZnFr(0x1e),zSZnFr(AgGLeTN(-0x5)),zSZnFr(0x20),zSZnFr(0x21),zSZnFr(AgGLeTN(-0x23)),zSZnFr(0x22),zSZnFr(0x23),zSZnFr(0x24),zSZnFr(0x25),zSZnFr(0x26),zSZnFr(0x27),zSZnFr(AgGLeTN(0x27)),zSZnFr(0x29),zSZnFr(0x2a),zSZnFr(AgGLeTN(0x29)),zSZnFr(AgGLeTN(-0x1d)),zSZnFr(AgGLeTN(0xae)),zSZnFr(0x2e),zSZnFr(AgGLeTN(-0x24)),'\u0034\u0029\u006f\u002c\u007b\u007c\u0032\u004e',zSZnFr(AgGLeTN(-0x26)),zSZnFr(0x31),zSZnFr(0x32),zSZnFr(0x33),zSZnFr(0x34),zSZnFr(AgGLeTN(-0x1f)),zSZnFr(0x36),zSZnFr(0x37),zSZnFr(0x38),zSZnFr(0x39),zSZnFr(AgGLeTN(-0x20)),zSZnFr(0x3b),zSZnFr(0x3c),zSZnFr(AgGLeTN(-0x21)),'4)o,{|2N',zSZnFr(AgGLeTN(-0x26)),zSZnFr(AgGLeTN(-0x25)),zSZnFr(0x3e),'.0I>?It4!^84nL}0K|GaYhb',zSZnFr(AgGLeTN(-0x1b)),zSZnFr(AgGLeTN(-0x3)),zSZnFr(AgGLeTN(0x18)),zSZnFr(0x31),zSZnFr(AgGLeTN(-0x10)),zSZnFr(0x41),zSZnFr(0x42),zSZnFr(AgGLeTN(-0x24)),zSZnFr(0x22),zSZnFr(AgGLeTN(-0x25)),'Op1wVAPk|;zmxF',zSZnFr(0x43),zSZnFr(AgGLeTN(0x2f)),zSZnFr(AgGLeTN(-0x25)),zSZnFr(0x45),zSZnFr(0x46),zSZnFr(0x47),zSZnFr(0x48),zSZnFr(AgGLeTN(-0x14)),zSZnFr(0x39),zSZnFr(0x4a),zSZnFr(0x4b),zSZnFr(0x4c),zSZnFr(AgGLeTN(0x2e)),zSZnFr(AgGLeTN(0x33)),zSZnFr(0x4f),'\u002e\u0065\u0026\u0070\u002e\u007c\u0028\u0063\u0074\u006d\u0070\u003d\u006b\u0041\u0063',zSZnFr(0x50),zSZnFr(AgGLeTN(-0x23)),zSZnFr(0x51),zSZnFr(AgGLeTN(0x53)),'\x3b\x5d\x31\x77\x66\x59\x71\x4e\x4b\x54\x46\x7c\x4c\x74\x44\x32\x5e\x5a\x67',zSZnFr(0x53),zSZnFr(AgGLeTN(0x3c)),zSZnFr(0x55),zSZnFr(0x56),zSZnFr(AgGLeTN(0x51)),zSZnFr(0x58),'\x7c\x65\x26\x70',zSZnFr(AgGLeTN(-0x1c)),zSZnFr(0x5a),zSZnFr(AgGLeTN(0xe)),zSZnFr(AgGLeTN(0x39)),zSZnFr(0x5d),zSZnFr(0x5e),zSZnFr(0x15),zSZnFr(AgGLeTN(-0x22)),zSZnFr(AgGLeTN(-0x13)),zSZnFr(AgGLeTN(-0x18)),zSZnFr(0x62),zSZnFr(AgGLeTN(0x3a)),zSZnFr(0x13),zSZnFr(0x64),zSZnFr(AgGLeTN(-0x25)),zSZnFr(0x29),zSZnFr(0x65),zSZnFr(0x66),zSZnFr(0x67),zSZnFr(AgGLeTN(-0x22)),zSZnFr(AgGLeTN(-0x21)),zSZnFr(AgGLeTN(0x4b)),zSZnFr(0x29),zSZnFr(0x13),zSZnFr(0x13),zSZnFr(0x69),zSZnFr(0x41),zSZnFr(0x42),zSZnFr(AgGLeTN(0x49)),'\u0062\u0055\u0040\u003e\u006b\u003b\u0063\u006c\u0024\u0056\u007a\u007c\u0028\u0044',zSZnFr(AgGLeTN(0x4a)),zSZnFr(0x6c),zSZnFr(AgGLeTN(0x4c)),zSZnFr(AgGLeTN(-0x20)),zSZnFr(0x44),zSZnFr(0x6e),zSZnFr(0x6f),zSZnFr(0x70),zSZnFr(0x46),zSZnFr(AgGLeTN(0x32)),zSZnFr(AgGLeTN(0x50)),zSZnFr(0x72),zSZnFr(0x17),zSZnFr(0x73),'|OZcCnFLo',zSZnFr(0x74),zSZnFr(0x75),zSZnFr(AgGLeTN(-0x7)),zSZnFr(0x77),zSZnFr(0x73),zSZnFr(0x78),zSZnFr(0x79),zSZnFr(0x7a),zSZnFr(0x7b),zSZnFr(AgGLeTN(0x54)),zSZnFr(0x7d),zSZnFr(AgGLeTN(0x55)),zSZnFr(AgGLeTN(-0x6)),zSZnFr(AgGLeTN(-0x25)),zSZnFr(AgGLeTN(-0x1e)),zSZnFr(AgGLeTN(0x40)),zSZnFr(AgGLeTN(-0x15)),zSZnFr(0x82),zSZnFr(AgGLeTN(0x42)),zSZnFr(AgGLeTN(0x6a)),zSZnFr(0x6a),zSZnFr(AgGLeTN(-0x1f)),zSZnFr(0x35),zSZnFr(0x85),zSZnFr(0x86),zSZnFr(0x5c),zSZnFr(AgGLeTN(-0xb)),zSZnFr(0x73),zS
// 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