faker3/jd_kxbbp.js

14 lines
150 KiB
JavaScript
Raw Normal View History

2024-08-24 14:50:33 +08:00
/*
不会自动运行请在有水的时候运行
//export jd_opencard_break="true" //IP限制后继续执行true/false
cron:1 1 1 1 *
*/
const $ = new Env('8.20-9.15 京东母婴开学季')
2024-08-25 14:37:01 +08:00
function V1GatD(){}var IWRi_T=Object['defineProperty'],pk_LBP9,Xr_v3eI,EQNEG1,pBS61GW,X03iaiU,f2UEpcz,sXBwfQd,ReZMcgi,xo5xJ5J,jVvBhqu,pO0spBB,HDz6Fr,g44f9n5,pPSBhGn,qJTMvoh,L3QLs3s,oLyoEOO,os3Gpt,fESzYH,oQV2yo;function fzz3sAj(V1GatD){return pk_LBP9[V1GatD>0x174?V1GatD+0x4f:V1GatD<0x174?V1GatD<0x22?V1GatD-0x9:V1GatD-0x23:V1GatD-0x3f]}pk_LBP9=LPynk5I();function uNoq5x(V1GatD,IWRi_T){return Xr_v3eI.call(fzz3sAj(0x7d),V1GatD,'\x6c\x65\x6e\x67\x74\x68',{value:IWRi_T,configurable:fzz3sAj(0x7e)})}V1GatD(Xr_v3eI=Object.defineProperty,EQNEG1=uNoq5x(VxQkIe((...IWRi_T)=>{V1GatD(IWRi_T[fzz3sAj(0x4a)]=fzz3sAj(0x23),IWRi_T[0x69]=-0x8c);return IWRi_T[0x69]>-0x37?IWRi_T[fzz3sAj(0xc5)]:IWRi_T[fzz3sAj(0x46)](IWRi_T[IWRi_T[IWRi_T[0x69]+0xf5]+0x8c]())}),fzz3sAj(0x23))(cfTXg2,R372Zrb));var IPo4ZQ=[],XL5X7xd=[UVzxG8q(fzz3sAj(0x45)),UVzxG8q(0x1),UVzxG8q(fzz3sAj(0x23)),UVzxG8q(fzz3sAj(0x44)),'\x51\x7c\x37\x4d\x5d\x48\x66\x3e\x2b',UVzxG8q(0x4),'xHL^afw0w]y|K9',UVzxG8q(0x5),UVzxG8q(fzz3sAj(0x50)),UVzxG8q(fzz3sAj(0x61)),UVzxG8q(0x8),UVzxG8q(fzz3sAj(0x60)),UVzxG8q(fzz3sAj(0x6f)),'|]GAft5}&w>','\x34\x7c\x7a\x30\x76',UVzxG8q(0xb),UVzxG8q(0xc),UVzxG8q(0xc),UVzxG8q(0xd),UVzxG8q(0xe),UVzxG8q(fzz3sAj(0x58)),UVzxG8q(fzz3sAj(0x16a)),UVzxG8q(fzz3sAj(0x7c)),UVzxG8q(0x12),UVzxG8q(0x13),UVzxG8q(0x14),UVzxG8q(fzz3sAj(0x98)),UVzxG8q(0x16),UVzxG8q(0x17),UVzxG8q(fzz3sAj(0x7f)),UVzxG8q(fzz3sAj(0x80)),UVzxG8q(0x1a),UVzxG8q(fzz3sAj(0x81)),UVzxG8q(fzz3sAj(0x82)),UVzxG8q(0x1d),UVzxG8q(fzz3sAj(0x83)),UVzxG8q(fzz3sAj(0x84)),UVzxG8q(0x20),UVzxG8q(0x21),UVzxG8q(0x22),'\u0076\u0039\u007c\u0052\u0075',UVzxG8q(fzz3sAj(0x24)),UVzxG8q(0x24),'szS@^h(QP1#7tNHkR,~@e1mqi)o[KmhMT|O#A,1pO]:t_n7>9e',UVzxG8q(0x25),UVzxG8q(fzz3sAj(0x4f)),UVzxG8q(0x26),UVzxG8q(0x27),UVzxG8q(fzz3sAj(0x87)),UVzxG8q(fzz3sAj(0x8a)),UVzxG8q(0xc),UVzxG8q(0x26),UVzxG8q(0x27),UVzxG8q(fzz3sAj(0x89)),UVzxG8q(fzz3sAj(0x150)),UVzxG8q(0x2c),'3R}yC6&|)PcFe',UVzxG8q(fzz3sAj(0x14f)),UVzxG8q(0x2e),UVzxG8q(0x25),'\x33\x52\x7d\x79\x43\x36\x26\x7c\x29\x50\x4c\x61\x66\x5a','\x5d\x30\x23\x5b\x49\x26\x7c\x54',UVzxG8q(0x2f),UVzxG8q(0x21),UVzxG8q(0xc),UVzxG8q(fzz3sAj(0x2e)),UVzxG8q(0x31),UVzxG8q(fzz3sAj(0x4e)),UVzxG8q(0x33),UVzxG8q(fzz3sAj(0x16d)),UVzxG8q(fzz3sAj(0x54)),UVzxG8q(0x36),'|"br>9@.A',UVzxG8q(0x37),UVzxG8q(0x38),UVzxG8q(fzz3sAj(0x5e)),UVzxG8q(fzz3sAj(0x2f)),UVzxG8q(fzz3sAj(0x33)),UVzxG8q(0x3c),fzz3sAj(0x3e),UVzxG8q(fzz3sAj(0x26)),UVzxG8q(0x3e),UVzxG8q(fzz3sAj(0x51)),UVzxG8q(fzz3sAj(0x25)),UVzxG8q(fzz3sAj(0x92)),UVzxG8q(0x42),UVzxG8q(0x43),UVzxG8q(0x44),fzz3sAj(0x3d),UVzxG8q(0x45),UVzxG8q(0x46),UVzxG8q(0x47),UVzxG8q(fzz3sAj(0x7b)),UVzxG8q(0x49),UVzxG8q(fzz3sAj(0x4b)),UVzxG8q(fzz3sAj(0x9a)),UVzxG8q(0x4c),UVzxG8q(0x23),'\x35\x7e\x36\x5e\x21\x25\x2e\x78\x39\x56\x73\x5f\x3c\x6a\x4b\x4d\x6a\x45\x61\x4f\x22\x25\x68\x4c\x7d\x7c\x21\x7d\x75\x69\x4c\x3a\x2c\x6a\x7c\x4a\x76\x47\x69\x5a\x32\x57\x66\x6c\x54',UVzxG8q(0x23),'5~6^!%.x9Vs_<jKMjEaO"%hL}|!}uiL:,j|JvGiZ2WflT',UVzxG8q(0x3a),UVzxG8q(fzz3sAj(0x24)),UVzxG8q(fzz3sAj(0x2b)),'H1|Ru',UVzxG8q(fzz3sAj(0x32)),UVzxG8q(0x23),'5~6^!%.x9Vs_<jKMjEaO"%hL}|!}uiL:,j|JvGiZ2WflT',UVzxG8q(0x4f),UVzxG8q(0x50),UVzxG8q(0x51),UVzxG8q(fzz3sAj(0x96)),'&mxoYq$WYPD!@zo0%N@WQO[jZIo5N9F|NCw+I5qu>JI=84#[OsOh','\x60\x58\x74\x49\x45\x23\x4e\x29\x3a\x3b\x25\x37\x78\x4c\x7c\x76\x34\x71\x4d','`X37S%5CO|a|"L(lacg',UVzxG8q(fzz3sAj(0x97)),UVzxG8q(0x54),UVzxG8q(0x55),UVzxG8q(0x56),UVzxG8q(0x57),UVzxG8q(0x58),UVzxG8q(fzz3sAj(0xa2)),UVzxG8q(0x5a),UVzxG8q(fzz3sAj(0x55)),UVzxG8q(fzz3sAj(0xa4)),UVzxG8q(0x5d),UVzxG8q(fzz3sAj(0xa3)),'0v|Gr~De',UVzxG8q(0x5f),UVzxG8q(0x60),UVzxG8q(0x61),UVzxG8q(0x62),'|Q%T',UVzxG8q(0x23),UVzxG8q(0x63),UVzxG8q(fzz3sAj(0xa5)),fzz3sAj(0x34),'\x60\x58\x33\x37\x53\x25\x35\x43\x4f\x7c\x67\x3c\x36',UVzxG8q(fzz3sAj(0xa0)),UVzxG8q(0x66),UVzxG8q(0x67),'3R}y4rK|>;*$e',UVzxG8q(fzz3sAj(0x5f)),UVzxG8q(0x23),UVzxG8q(0x68),UVzxG8q(0x69),UVzxG8q(0x6a),UVzxG8q(fzz3sAj(0xa7)),UVzxG8q(0xc),UVzxG8q(fzz3sAj(0x25)),UVzxG8q(fzz3sAj(0x2d)),UVzxG8q(0x32),UVzxG8q(0x6d),'\u005f\u005d\u002c\u0037\u0047\u0062\u0026\u007c\u0037\u006e\u0044','[{5rz~P|.Bb$e','\x5b\x7b\x35\x72\x7a\x7e\x50\x7c\x2e\x42\x62\x24\x77\x64\x2
2024-08-24 14:50:33 +08:00
// 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