faker3/jd_opencard_1106.js

17 lines
128 KiB
JavaScript
Raw Normal View History

2024-11-06 18:16:13 +08:00
/*
11.6-11.13 大牌有礼 狂欢来袭
不会自动运行请在有水的时候运行
//export jd_opencard_draw="3" //抽奖次数 3
//export jd_opencard_break="true" //IP限制后继续执行true/false
cron "1 1 1 1 *" script-path=jd_opencard_1106.js
*/
const $ = new Env('11.6-11.13 大牌有礼 狂欢来袭')
function V6gpWvr(){}var PT1ak69=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],DA5u1U,UTe3JMM,cIzoQGQ,qcaHSF,iJ0tX3,xe4Ctr_,uXtLtth,DE6WDNi,t1vgr6L,LwgaAi,pzXHgc,Y2bDSpr,WVr1iMO,qU71CS,MwaOzJ,xLTO5vr,b0zwIX,UEEHcVZ,BcHecl,v6CgiQ8,qOAMpm;function SJdTFBk(V6gpWvr){return DA5u1U[V6gpWvr<0x1a3?V6gpWvr>0x1a3?V6gpWvr+0x45:V6gpWvr-0x62:V6gpWvr-0x15]}DA5u1U=fD31qn();function _x9Q4y(V6gpWvr,PT1ak69){return UTe3JMM.call(SJdTFBk(0xb0),V6gpWvr,'length',{value:PT1ak69,configurable:!0x0})}V6gpWvr(UTe3JMM=Object.defineProperty,cIzoQGQ=_x9Q4y(Oat1U5((...PT1ak69)=>{var UTe3JMM=Oat1U5(PT1ak69=>{return DA5u1U[PT1ak69>-0x30?PT1ak69>-0x30?PT1ak69<-0x30?PT1ak69+0x30:PT1ak69+0x2f:PT1ak69+0x3d:PT1ak69-0x4b]},0x1);V6gpWvr(PT1ak69.length=SJdTFBk(0x64),PT1ak69[UTe3JMM(-0x2f)]=PT1ak69[SJdTFBk(0x86)]);return PT1ak69[UTe3JMM(-0x2e)](PT1ak69[SJdTFBk(0x62)]())}),0x2)(ao_B25n,a4bQZz0));var EemsfZZ=[],xS0mJeX=[XFuag78(0x0),XFuag78(SJdTFBk(0x63)),XFuag78(SJdTFBk(0x64)),XFuag78(0x3),XFuag78(SJdTFBk(0x92)),XFuag78(SJdTFBk(0x90)),XFuag78(SJdTFBk(0x8b)),XFuag78(0x7),':f(AyZe|q(~rT+q',XFuag78(0x8),XFuag78(0x9),'\x33\x7b\x47\x51\x7c\x59\x72\x71\x38\x61\x6a\x6e\x2e\x6d\x56\x7d\x7c\x74\x79\x3a','\u0033\u007b\u0047\u0051\u007c\u0059\u0039\u004c',XFuag78(0xa),XFuag78(SJdTFBk(0xb2)),XFuag78(0xc),'3{GQ|Yrq8ajn.mF38X[;`kM',XFuag78(0xd),XFuag78(0xe),XFuag78(SJdTFBk(0x8e)),XFuag78(SJdTFBk(0xb3)),XFuag78(0x11),XFuag78(0x12),XFuag78(SJdTFBk(0xae)),XFuag78(0x14),XFuag78(0x15),XFuag78(0x16),XFuag78(0x17),XFuag78(SJdTFBk(0x8f)),XFuag78(0x19),XFuag78(SJdTFBk(0x10c)),'\x6b\x47\x7a\x56\x4f\x5e\x32\x55\x25\x57\x77\x52\x44\x53\x30\x6a\x46\x3f\x71\x5a\x77\x25\x70\x41\x7e\x7a\x53\x7c\x7b\x48\x48\x6d\x6d\x73\x5f\x2a\x61\x3d\x50\x4b\x77\x26\x43\x3f\x58\x79\x71\x32\x28\x25\x77\x4e\x25\x39\x3a\x3a\x4a\x4f\x44\x26\x61\x61\x6a\x32\x6f\x66',XFuag78(SJdTFBk(0xb4)),XFuag78(0x1c),XFuag78(SJdTFBk(0xd2)),XFuag78(0x1b),XFuag78(SJdTFBk(0x65)),XFuag78(SJdTFBk(0xb7)),XFuag78(SJdTFBk(0xb9)),XFuag78(0x21),XFuag78(SJdTFBk(0xb8)),XFuag78(SJdTFBk(0x67)),'\u0041\u004f\u0072\u007e\u005f\u002f\u0045\u0064\u006d\u007c\u0021\u0052\u0066',XFuag78(SJdTFBk(0x102)),XFuag78(SJdTFBk(0x7b)),XFuag78(0x25),XFuag78(0x26),XFuag78(0x27),XFuag78(0x28),XFuag78(0x29),XFuag78(SJdTFBk(0x65)),XFuag78(0x2a),XFuag78(0x2b),XFuag78(0x2c),XFuag78(0x2d),XFuag78(0x2e),XFuag78(0x2f),XFuag78(0x30),XFuag78(0x31),XFuag78(0x32),XFuag78(SJdTFBk(0x93)),XFuag78(0x34),XFuag78(SJdTFBk(0xc2)),XFuag78(0x36),XFuag78(SJdTFBk(0xc0)),XFuag78(0x38),XFuag78(0x39),XFuag78(0x3a),'\u007c\u0074\u002c\u0030\u0077\u006a\u0066\u004c',XFuag78(0x3b),XFuag78(SJdTFBk(0xc4)),XFuag78(0x3d),XFuag78(0x3e),XFuag78(0x3f),XFuag78(0x40),XFuag78(0x41),'/R10sXwl|',XFuag78(0x42),XFuag78(SJdTFBk(0xc6)),'\x79\x32\x51\x29\x3f\x62\x43\x68\x7c',XFuag78(SJdTFBk(0x6a)),XFuag78(0x45),XFuag78(SJdTFBk(0xc7)),XFuag78(SJdTFBk(0x66)),XFuag78(SJdTFBk(0xc8)),XFuag78(0x47),XFuag78(0x48),XFuag78(0x49),XFuag78(0x4a),XFuag78(0x4b),XFuag78(0x4c),XFuag78(SJdTFBk(0x69)),XFuag78(0x4e),XFuag78(0x4f),XFuag78(0x50),XFuag78(0x51),XFuag78(0x10),XFuag78(0x52),XFuag78(SJdTFBk(0x66)),XFuag78(0x53),XFuag78(0x54),XFuag78(SJdTFBk(0x67)),'}J1P"2$<TYuA*BM|h3x',XFuag78(SJdTFBk(0x72)),'wJ%<=NU@|',XFuag78(0x56),XFuag78(0x26),XFuag78(SJdTFBk(0x66)),'\x6b\x40\x28\x33\x2e\x64\x62\x5b\x55\x49\x62\x35\x7e\x7c\x25\x52\x7c\x7e',XFuag78(0x57),XFuag78(SJdTFBk(0xa2)),XFuag78(SJdTFBk(0xdd)),XFuag78(0x5a),XFuag78(SJdTFBk(0x9a)),XFuag78(0x4c),'F*@X%mGPLAGdx:=2}d<oU1+8^VYlOC0kq#Yq9FhKMQ26|MU*.a4cP',XFuag78(0x5c),XFuag78(0x5d),XFuag78(SJdTFBk(0x9c)),XFuag78(0x5f),XFuag78(SJdTFBk(0x109)),XFuag78(0x61),XFuag78(SJdTFBk(0xb5)),XFuag78(0x63),XFuag78(SJdTFBk(0x6c)),XFuag78(0x65),XFuag78(0x4c),'\u005d\u0030\u006f\u0052\u005b\u006d\u0062\u0031\u0052\u0063\u0049\u005d\u007c\u005f\u007b',XFuag78(0x66),XFuag78(SJdTFBk(0x15b)),XFuag78(SJdTFBk(0x70)),XFuag78(SJdTFBk(0x11c)),XFuag78(SJdTFBk(0xf3)),XFuag78(SJdTFBk(0x99)),XFuag78(0x6b),XFuag78(SJdTFBk(0xf4)),XFuag78(SJdTFBk(0xc9)),XFuag78(0x6e),XFuag78(SJdTFBk(0xa7)),XFuag78(0x70),XFuag78(SJdTFBk(0xbb)),XFuag78(0x72),XFuag78(SJdTFBk(0xf1)),XFuag78(0x74),XFuag78(SJdTFBk
// 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