faker3/jd_opencard_0909.js

17 lines
128 KiB
JavaScript
Raw Normal View History

2024-09-09 15:10:35 +08:00
/*
9.9-9.16 月满中秋 大牌相惠
不会自动运行请在有水的时候运行
//export jd_opencard_draw="3" //抽奖次数 3
//export jd_opencard_break="true" //IP限制后继续执行true/false
cron "1 1 1 1 *" script-path=jd_opencard_0909.js
*/
const $ = new Env('9.9-9.16 月满中秋 大牌相惠')
function DkmhuQe(){}var Gs5PbJ=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],wp6Vdf,FZAEGJt,AtyBUq,qxLtqce,CHyynp,n6ecea,Q30TwY,qki31FH,xNVYsM,ruIEW6F,TuGJPS,WpigW2,FDWUFe,NOLJm8,K3_PEu;function lvkFxX(DkmhuQe){return wp6Vdf[DkmhuQe<-0x52?DkmhuQe-0x41:DkmhuQe>0xfd?DkmhuQe+0x58:DkmhuQe+0x51]}wp6Vdf=fareJya();function BdQUrO5(DkmhuQe,Gs5PbJ){return FZAEGJt.call(lvkFxX(0x6e),DkmhuQe,lvkFxX(-0x1f),{value:Gs5PbJ,configurable:lvkFxX(0x26)})}DkmhuQe(FZAEGJt=Object.defineProperty,AtyBUq=KYIuTHQ((DkmhuQe,Gs5PbJ)=>{return Gs5PbJ(DkmhuQe())},0x2)(RkolD_n,IR3zqa));var mmyaU3c=[],ds8UvH9=[Oe4dsjC(lvkFxX(-0x34)),'D|~G9(}I','|i9R','\x5b\x78\x24\x43\x51\x55\x5a\x29\x4a\x66\x7b\x40\x63\x6b\x7d\x36\x51\x68\x7c\x52',Oe4dsjC(lvkFxX(-0x33)),Oe4dsjC(lvkFxX(-0x29)),Oe4dsjC(lvkFxX(-0x2c)),Oe4dsjC(0x4),Oe4dsjC(lvkFxX(-0xe)),Oe4dsjC(lvkFxX(-0x30)),Oe4dsjC(0x7),Oe4dsjC(0x8),Oe4dsjC(0x9),Oe4dsjC(0xa),Oe4dsjC(0xb),Oe4dsjC(0xc),Oe4dsjC(0x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dsjC(lvkFxX(0x2)),Oe4dsjC(lvkFxX(-0x18)),Oe4dsjC(0x3b),'{O}|tg&NX',Oe4dsjC(lvkFxX(-0x4b)),Oe4dsjC(0x3d),'\u007c\u0069\u0043\u006f\u004b\u0037\u0067\u0031\u0051',Oe4dsjC(0x3e),'\u0043\u0064\u0079\u007c','n/y|7,%F',Oe4dsjC(0x3f),Oe4dsjC(lvkFxX(0x5)),Oe4dsjC(lvkFxX(-0x50)),Oe4dsjC(0x41),'%|IOvVa}n~4:<i',Oe4dsjC(0x42),Oe4dsjC(0x3f),'7|brf1@ub@VxBab(]=0Bs{!<%X','`l}|@',Oe4dsjC(0x43),'[J!|',Oe4dsjC(0x44),Oe4dsjC(0x45),Oe4dsjC(0x46),Oe4dsjC(lvkFxX(-0x1a)),Oe4dsjC(lvkFxX(-0x21)),'[J!|',Oe4dsjC(0x48),'\u0035\u0069\u007d\u007c\u003d\u006d\u0037\u0046','%|B&rNipPyVO#`~=G5F',Oe4dsjC(0x49),Oe4dsjC(lvkFxX(0xf)),'%|zsJEY_`C.',Oe4dsjC(lvkFxX(-0x50)),'\u0064\u0033\u002a\u005b\u0063\u0070\u0037\u007e\u0038\u0025\u0037\u0023\u0058\u0051\u0047\u003a\u0056\u0054\u006e\u0025\u0060\u0029\u003f\u0031\u0030\u0073\u0076\u0033\u004d\u0052\u006d\u007c\u0034\u0047\u0039\u002f\u004f\u0051\u0065\u0067\u0035\u0050\u0029\u0028\u0050\u0059\u0040\u007a\u003d\u0028\u0048\u003e\u0056\u0054\u0043\u005b\u0068\u0076\u002b\u0079\u0071\u004b\u0064\u002e\u0030\u0058',Oe4dsjC(0x4b),'%|IOvV7F',Oe4dsjC(lvkFxX(-0x26)),Oe4dsjC(lvkFxX(-0x50)),Oe4dsjC(0x4d),Oe4dsjC(0x4e),Oe4dsjC(0x4f),Oe4dsjC(0x50),Oe4dsjC(0x51),'eM|Oj',Oe4dsjC(0x52),Oe4dsjC(0x3f),Oe4dsjC(lvkFxX(-0x42)),Oe4dsjC(0x53),Oe4dsjC(lvkFxX(0x14)),Oe4dsjC(lvkFxX(-0x4e)),Oe4dsjC(0x56),Oe4dsjC(lvkFxX(0x15)),Oe4dsjC(lvkFxX(-0x16)),Oe4dsjC(0x59),Oe4dsjC(0x5a),'[J!|',Oe4dsjC(0x5b),Oe4dsjC(0x5c),Oe4dsjC(0x5d),Oe4dsjC(0x5e),Oe4dsjC(lvkFxX(0x32)),Oe4dsjC(0x60),Oe4dsjC(lvkFxX(0x21)),Oe4dsjC(lvkFxX(0x22)),Oe4dsjC(0x63),Oe4dsjC(lvkFxX(0x1d)),Oe4dsjC(0x65),Oe4dsjC(lvkFxX(0x24)),Oe4dsjC(0x67),Oe4dsjC(0x68),Oe4dsjC(0x69),Oe4dsjC(lvkFxX(0x28)),Oe4dsjC(0x6b),Oe4dsjC(lvkFxX(0x2b)),Oe4dsjC(0x6d),'\x5d\x25\x71\x38\x4b\x33\x5b\x2b\x2a\x4c\x7c\x3a\x7d\x56\x2b',Oe4dsjC(lvkFxX(-0x48)),Oe4dsjC(lvkFxX(0x2a)),Oe4dsjC(0x70),Oe4dsjC(lvkFxX(0x2c)),Oe4dsjC(lvkFxX(0x2e)),Oe4dsjC(lvkFxX(-0x4f)),Oe4dsjC(lvkFxX(0x72)),Oe4dsjC(0x74),Oe4dsjC(lvkFxX(0x2d)),Oe4dsjC(0x76),Oe4dsjC(0x77),Oe4dsjC(0x78),Oe4dsjC(0x79),Oe4dsjC(0x7a),Oe4dsjC(lvkFxX(0x30)),Oe4dsjC(0x7c),Oe4d
// 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