faker3/jd_opencard_0221.js

15 lines
100 KiB
JavaScript
Raw Normal View History

2025-02-28 16:45:55 +08:00
/*
环境变量
export jd_opencard_draw="3" //抽奖次数 3
export jd_opencard_notify="true" // 是否推送
cron:59 23 29 2 *
*/
const $ = new Env('3.8 真我不设限女王自定义')
function IOsJTcq(){}var mVpwza=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],IxJjbJ,zUDd9j,EiLSKb,d_c9vV,MQBCP1,rrAIhC,okuz27_,gP8uYNA,NStLZyh,A0eXxx,Fh72JB,H9HIKk1,uY8lMyd,p6qFj3,TxKBf0V;function GI60ASA(IOsJTcq){return IxJjbJ[IOsJTcq>0x6d?IOsJTcq-0x53:IOsJTcq<0x6d?IOsJTcq+0xb:IOsJTcq+0x3e]}IOsJTcq(IxJjbJ=oHrmPS(),zUDd9j=PlRqLq8((IOsJTcq,mVpwza)=>{return mVpwza(IOsJTcq())},0x2)(dmGcAOU,nFlnfmA));var G4jy9C=[],RcdRad=['\x5f\x47\x61\x7b\x7c\x2c\x5f\x37\x6c','\u0058\u0026\u002f\u004f\u0073\u0073\u0029\u0037\u0051','\u0078\u0031\u0034\u003a\u006b\u006f\u0076\u0025','\x6e\x53\x69\x5a\x43\x6a\x4c\x7c','\u003b\u0075\u003c\u0025\u0057',oagVyK(GI60ASA(0x1)),'\x7a\x3f\x6a\x5b\x29\x65\x35\x35\x63\x3e\x39\x6f\x48\x46\x3a\x57\x70\x55\x43\x34','\x49\x53\x5b\x64\x74',oagVyK(0x1),'\x68\x4e\x62\x25\x55\x6a\x67\x72\x5f\x42\x48\x46\x4d\x59\x3d\x71\x38\x68\x61\x43\x66\x64\x55\x48\x5b\x4c\x37\x4d\x2c\x49\x4b\x71\x6f\x4a\x62\x47\x2b\x47\x63',oagVyK(0x2),oagVyK(0x3),'JK,xd8s|','\u0075\u0045\u002e\u0078','\u007c\u0026\u003c\u0064\u0074','Q|mNY<S({=]aIY8jNne({$!ItCdD@J<v>d2Zt',oagVyK(0x4),'\u0058\u0031\u002e\u0078','\x7c\x26\x3c\x64\x74',oagVyK(0x5),'hNb%xqvrJpDST8:UKm,_DJ|sdb8nS_6(h#HdodHHEHR',oagVyK(GI60ASA(0x3)),'\u0079\u0023\u0062\u0025\u0064\u0050\u0058\u0048\u0053\u0048\u0045\u0035\u0077','\u005d\u003e\u004c\u0043\u0050\u006a\u004b\u007c',GI60ASA(-0x4),oagVyK(0x7),'\u0073\u0078\u0030\u0064\u0074\u0049\u0050\u0035\u004e\u0055','\u0067\u004a\u0038\u0047\u0023\u0043\u0030\u0077\u0047\u0055\u0059\u0068\u005a\u004b\u0074\u0057\u0052\u0053\u0067\u0026\u005f\u0058\u006e\u007a\u0062\u003a\u003f\u0052\u0058\u007c\u0057\u005d\u006e\u0045\u0039',oagVyK(0x8),oagVyK(0x9),'\x79\x23\x62\x25\x64\x50\x58\x48\x53\x48\x45\x35\x77','\x4b\x31\x6d\x45\x3c\x37\x7e\x7c',oagVyK(GI60ASA(0xf)),'\u005d\u003e\u004c\u0043\u0050\u006a\u004b\u007c',oagVyK(0xb),'3>VCDP3/Mea','\u0058\u0045\u002a\u0042\u003e\u0052\u0074\u005b\u005b\u0055',oagVyK(0xc),'\x51\x4e\x58\x2e\x5e\x37\x69\x7c',oagVyK(GI60ASA(0xb)),'~>#C,VA3z','$zBerhD@@(','\u0038\u0075\u005d\u0057\u006d\u006f\u005f\u0036\u007e\u006a\u0042\u005a\u004d\u0029','\x26\x58\x62\x57\x3c\x66\x2e\x2a',GI60ASA(-0xb),'z&/xZPA|',oagVyK(0xe),'\u0034\u0073\u0058\u0064\u003a\u0043\u0034\u0048\u0053\u0048\u0056\u0060\u0054\u0038\u0072\u004a',oagVyK(0xf),oagVyK(0x10),'\x58\x31\x45\x5a\x36\x21\x73\x7c',oagVyK(GI60ASA(0x8)),'\u005f\u0031\u0048\u0064\u0074',oagVyK(0x12),'\u0052\u0045\u0041\u0042\u004a\u0021\u0043\u0034\u0021\u006c',GI60ASA(-0x3),'\x3c\x31\x6b\x5a\x3a\x43\x2c\x7c','5!}4','\u003d\u006a\u0049\u0069\u0058\u0040\u0033\u005a\u0056\u0050\u007b\u0066\u0042\u006c\u002f\u0021\u006c\u0034\u0032\u0028\u003e\u0040\u0038\u0022\u0030\u007e\u0058\u0030\u0057\u0048\u0022\u0029\u0076\u006c\u007e\u0079\u004e\u0060\u0048\u0026\u0046\u0072\u004f\u0055\u007c','l"N@[*0XJ','\u0060\u006b\u0025\u0061','\x3c\x31\x3c\x57\x26\x52\x3b\x49\x74\x43\x64\x44\x21\x70\x7d\x4e\x71\x7e\x68\x69\x7a\x7d\x63',GI60ASA(-0xb),'\x7a\x26\x2f\x78\x5a\x50\x41\x7c',oagVyK(0x13),oagVyK(0x14),'\x37\x29\x7e\x74\x63\x51\x58\x75','\u004d\u004a\u0033\u005a\u0067\u002a\u0063',GI60ASA(-0x6),oagVyK(0x15),'\u002c\u004e\u0035\u0042\u006a\u006a\u006f\u0035\u0044\u002f\u0061','\u0061\u0079\u004a\u0025\u0035\u0038\u0055\u0054\u0054\u004c',oagVyK(GI60ASA(0x17)),'h!$WE/;u',oagVyK(GI60ASA(0x18)),'\x28\x21\x24\x57\x71\x2c\x58\x75','\x36\x31\x5e\x5a\x76\x56\x28\x7c','\x3e\x3e\x30\x64\x25\x37\x5d\x48\x34','\u005f\u0031\u0048\u0064\u0074','I9Y6vV:|','\x4a\x4b\x48\x64\x3e\x6a\x24\x6a\x4e\x6d\x45',oagVyK(GI60ASA(0x13)),oagVyK(0x19),oagVyK(GI60ASA(0x19)),'\x62\x73\x2a\x42\x2a\x4f\x58\x79\x67\x70\x68\x70\x58\x69\x6b\x4a','\x7c\x6b\x40\x34\x7c\x6d\x35\x64\x70\x4e\x34\x6f\x66\x6e\x64','REZ=uC4HxU~Sw','\x5d\x3e\x4c\x43\x50\x6a\x4b\x7c','\x3a\x4f\x4a\x25\x2a\x29\x75\x43\x3f','\x36\x3e\x2f\x78\x3d\x38\x79\x42\x4e\x55','\u006c\u003e\u0030\u0064\u0068\u0021\u0040\u007c\u0025\u0055\u0026\u0029\u007a\u0067\u002a\u004a\u0056\u0053\u0039','AHdag','\u0061\u0022\u002e\u0057\u0039','87i|d"CADQ^qzghE~TN1$L*cwCgH0*','\x5f\x6a\x45\x40\x69\x71\x54\x42\x63\x4b\x7a\x42\x5f\x2e\x2f\x21\x36\
// 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