faker3/jd_opencard_0303.js

15 lines
95 KiB
JavaScript
Raw Normal View History

2025-03-03 17:43:25 +08:00
/*
环境变量
export jd_opencard_draw="3" //抽奖次数 3
export jd_opencard_notify="true" // 是否推送
cron:59 23 29 2 *
*/
const $ = new Env('3.19 宠爱有一套当妈更闪亮')
function LhlyENP(){}var jd_LaQ=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],_E3KZi,Cg9gcXL,il513QB,R3l6zny,IRyhRVX,ZOF673,U4Hi0o,UGZmjgU,wku6UQ,z_ib86,Rhc7sh,AgSZlcA,iepKbB,QI9x7D,ylNhdg;function tgml5rv(LhlyENP){return _E3KZi[LhlyENP>0x62?LhlyENP<0x62?LhlyENP+0x2a:LhlyENP-0x63:LhlyENP-0x11]}LhlyENP(_E3KZi=V2u9c_(),Cg9gcXL=lxh4Y4((LhlyENP,jd_LaQ)=>{return jd_LaQ(LhlyENP())},0x2)(gM7cDx,xoQpDM));var ckkPe0=[],pAXo0M=[NZLlLH7(0x0),'\u0058\u0041\u0062\u0036\u004b\u005f\u0074\u0039','\u004e\u007a\u005a\u004c\u0069',NZLlLH7(tgml5rv(0x76)),'%F(6=NH/!WKlp_|%!"X#8JS',NZLlLH7(0x2),NZLlLH7(0x3),NZLlLH7(tgml5rv(0xbc)),'\u0065\u004f\u0029\u004b\u0063','\x3b\x75\x2f\x6b','\u003c\u0061\u002e\u006b\u0045\u0030\u0068\u003a',NZLlLH7(0x5),NZLlLH7(tgml5rv(0x7a)),'\x52\x3a\x51\x22\x70\x5a\x77\x2b\x48\x63\x3f\x6a\x5f\x70\x30\x26\x22\x34\x49\x2b\x48\x78\x2f\x5f\x58\x5d\x45\x65\x38\x3c\x5a\x39\x4f\x45\x6c\x50\x58',NZLlLH7(0x7),tgml5rv(0x64),'\u003a\u0075\u005a\u0045\u0058','\u006d\u004f\u0041\u004c\u005e\u002f\u002c\u002a\u0031\u0034\u0023\u007c\u0061\u005b\u0037\u002c\u0033\u003b','o"ALk,9J<WewT0d)aQ.7e<:hEA04w71+ovQ#}Urtof','\u002e\u0030\u003c\u007c\u0022\u006c\u0035\u0056\u0022\u0062\u0073','\x56\x76\x41\x4c\x45\x4b\x4d\x66\x77\x66\x23\x79\x3b',tgml5rv(0x63),NZLlLH7(0x8),NZLlLH7(tgml5rv(0x7c)),'\x4d\x70\x2a\x23\x4c\x7d\x54\x38\x61\x5b','\u0049\u0079\u004f\u0036\u003f\u002b\u002a\u0026\u0036\u005b\u0066\u007b\u0030\u0041\u003a\u0044\u0067\u0067\u0049\u007b\u0075\u0047\u0077\u005b\u0057\u003f\u004a\u0046\u005f\u0071\u0044\u0024\u0045\u004b\u003c','Mp*#L}/!H`U|>{','\u006c\u003f\u0079\u0032\u0050\u0030\u0053\u007e\u005b\u006d\u006a',NZLlLH7(tgml5rv(0x9c)),NZLlLH7(0xb),'\u0023\u0061\u0041\u004c\u007e\u0030\u0053',tgml5rv(0x63),'(yiDInu',NZLlLH7(0xc),'\x35\x75\x3c\x5a\x4e\x70\x42\x77\x77\x69',NZLlLH7(tgml5rv(0x7e)),NZLlLH7(0xe),'\u0041\u004e\u0061\u007b\u002a\u003d\u0053','\u0036\u004e\u005e\u0071\u0030\u0028\u004c\u0050\u0043','\x60\x67\x3a\x44\x2b\x6a\x64\x78','\u002e\u0061\u003f\u006e\u0056\u0073\u0058\u0036\u0036\u0029','\u0049\u0079\u0051\u0023\u0054\u006a\u005e\u0077\u0035\u0056\u004b\u0034\u0068\u007b','\u0050\u005e\u0061\u007b\u0074\u0071\u0041\u0045','Zu3ki',NZLlLH7(tgml5rv(0x88)),NZLlLH7(0x10),'\u003e\u0068\u004d\u0045\u0064\u005d\u003e\u0066\u0077\u0066\u0067\u007c\u0054\u0030\u004a\u003c','\u0030\u006d\u0067\u003a\u0035','\x28\x42\x67\x5d\x6f\x7c\x53','\u004d\u0035\u0023\u0050\u0031\u002f\u0068\u003a',NZLlLH7(tgml5rv(0x8a)),'\x37\x35\x66\x45\x58','\x52\x3c\x36\x47\x3e\x55\x2e\x7e\x3d',NZLlLH7(tgml5rv(0x8c)),'\u005a\u0035\u0074\u0050\u0064\u005d\u0053','\u005a\u0035\u0074\u0050\u0064\u005d\u002e\u003a','\x4d\x35\x47\x6b','c&_%M8~PgKH$2m{/m>l+O80`D3MDif`*9m3V"|fu(J@):',tgml5rv(0x69),NZLlLH7(tgml5rv(0x8d)),NZLlLH7(0x14),'\x5a\x75\x33\x6b\x69','\x3d\x75\x7b\x6b\x50\x4b\x5e\x3a','\x44\x23\x72\x32\x40\x32\x36\x2c\x2e\x6d\x73',NZLlLH7(0x15),'\u007e\u0076\u0066\u0045\u006a\u005d\u006d\u003a','\x5b\x3c\x7e\x50\x7d\x72\x53',tgml5rv(0x64),NZLlLH7(tgml5rv(0x8e)),'."y2&&!ye{j','\u004c\u0049\u0072\u0032\u004d\u007a\u002c\u0036\u0036\u0029',NZLlLH7(tgml5rv(0x65)),NZLlLH7(0x18),'\x39\x35\x58\x23\x2f\x26\x30\x56\x42',NZLlLH7(0x19),'\x31\x35\x59\x50\x39\x67\x2b\x3a','\x2e\x2e\x60\x21\x49\x7e\x3d\x77\x64',NZLlLH7(0x1a),'_Bp19gd:','\u004d\u0042\u0077\u0021\u002e\u0055\u0066\u0055\u0052\u0039\u002c',NZLlLH7(0x1b),NZLlLH7(0x1c),'\u0031\u0035\u007a\u0047',NZLlLH7(tgml5rv(0x8f)),'\u005e\u0061\u007b\u006b\u005e\u002a\u004d\u0056\u007d\u0057\u006b\u0051\u0033\u005f\u0056','\x73\x23\x50\x63\x7a\x5d\x3e\x66\x6b\x29\x33\x77\x3b','\u003f\u004f\u0062\u005d\u004b\u0026\u0061\u003a',NZLlLH7(0x1e),'\x31\x4f\x7b\x6b\x63\x30\x56\x32\x22\x29',NZLlLH7(0x1f),'\u0050\u004f\u0056\u004c\u0069','\u004c\u0075\u005b\u0023\u0046','\x7a\x7e\x24\x5e\x56\x75\x6c\x50\x4e\x5d\x52\x64\x53\x69\x39\x2f\x66\x36\x57\x2b\x58\x29\x3e\x6a\x25\x6c\x69\x4f\x3b\x3e','\x37\x26\x23\x38\x25\x2c\x54\x32\x53\x61\x3d\x32\x37\x47\x7b\x2f\x31\x75\x29\x62\x5f\x38\x24\x37\x46\x69\x68\x24\x6e\x2c\x36\x26\x60\x41\x6c\x2b\x7c\x37\x44\x4c\x34\x33\x49','*a{k',NZLlLH7(tgml5rv(0x92)),'\x4d
// 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