jdpro/jd_cjzzj.js

7 lines
85 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
0 6,20 * * * jd_cjzzj.js
*/
const $ = new Env('超级抓抓机');
2024-11-03 14:13:05 +00:00
function O6xmLVF(){}var A3zlws=Object['defineProperty'],_nthZC,zslAT2L,B4V6yF1,peoJmC,NvKAdDT,euQutp,OsnSL1m,WMCS5BW,evt_0h,U1vAWz,SyC8g6,T4Ue5V,GgdYt0,pFB3yW,n_6e5m,ijlCr7,ifmOYE,HIgnHQ;function zRwgjO(O6xmLVF){return _nthZC[O6xmLVF>0x100?O6xmLVF+0x4c:O6xmLVF-0x34]}_nthZC=E1zs1Gd();function VMoPoA3(O6xmLVF,A3zlws){return zslAT2L.call(null,O6xmLVF,zRwgjO(0x63),{value:A3zlws,configurable:zRwgjO(0x8c)})}O6xmLVF(zslAT2L=Object.defineProperty,B4V6yF1=WScM_vn((O6xmLVF,A3zlws)=>{return A3zlws(O6xmLVF())},0x2)(U5bqU7,zHry22t));var SpQyMQ=[],uxuYDET=[d6m0Ww0(0x0),d6m0Ww0(zRwgjO(0x4a)),d6m0Ww0(0x2),d6m0Ww0(0x3),d6m0Ww0(zRwgjO(0x4b)),d6m0Ww0(zRwgjO(0x5a)),d6m0Ww0(0x6),d6m0Ww0(0x7),d6m0Ww0(zRwgjO(0x5f)),d6m0Ww0(0x9),d6m0Ww0(zRwgjO(0x34)),d6m0Ww0(zRwgjO(0x66)),d6m0Ww0(zRwgjO(0x35)),d6m0Ww0(zRwgjO(0x6a)),d6m0Ww0(zRwgjO(0x5d)),'+|[Z;sq}S?e3k.%ftZ"n4PEWIWVi5u28{!Py1ZL6KGDnFlJ|mF9D:Gn+<wb@62!.ar',d6m0Ww0(0xf),d6m0Ww0(zRwgjO(0x34)),d6m0Ww0(zRwgjO(0x35)),d6m0Ww0(0x10),d6m0Ww0(0x11),d6m0Ww0(0x12),d6m0Ww0(0x8),d6m0Ww0(0x13),'I|8M8',d6m0Ww0(zR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6m0Ww0(zRwgjO(0xa2)),d6m0Ww0(zRwgjO(0x39)),':aCD}=d|`',d6m0Ww0(0x73),d6m0Ww0(0x30),d6m0Ww0(0x74),'Qa?.q$+!|O',d6m0Ww0(zRwgjO(0x8a)),d6m0Ww0(zRwgjO(0xa3)),d6m0Ww0(0x2d),d6m0Ww0(zRwgjO(0x3a)),d6m0Ww0(zRwgjO(0x42)),d6m0Ww0(zRwgjO(0xa4)),d6m0Ww0(0x78),d6m0Ww0(0x79),d6m0Ww0(0x7a),d6m0Ww0(0x7b),d6m0Ww0(0x7c),d6m0Ww0(0x7d),d6m0Ww0(0x57),d6m0Ww0(0x7e),d6m0Ww0(0x7f),d6m0Ww0(0x80),d6m0Ww0(0x81),d6m0Ww0(zRwgjO(0xa6)),d6m0Ww0(zRwgjO(0xa7)),d6m0Ww0(0x84),d6m0Ww0(0x85),d6m0Ww0(0x86),d6m0Ww0(0x87),d6m0Ww0(0x88),d6m0Ww0(0x89),d6m0Ww0(zRwgjO(0x3b)),d6m0Ww0(0x8a),d6m0Ww0(0x5d),d6m0Ww0(0x47),d6m0Ww0(zRwgjO(0x47)),d6m0Ww0(zRwgjO(0xfd)),d6m0Ww0(0x8d),d6m0Ww0(zRwgjO(0xa8)),d6m0Ww0(zRwgjO(0x3c)),d6m0Ww0(0x8f),d6m0Ww0(0x90),d6m0Ww0(0x91),d6m0Ww0(zRwgjO(0x6c)),d6m0Ww0(0x37),d6m0Ww0(0x93),d6m0Ww0(0x94),d6m0Ww0(0x95),d6m0Ww0(zRwgjO(0x3d)),d6m0Ww0(zRwgjO(0xac)),d6m0Ww0(0x97),d6m0Ww0(0x98),d6m0Ww0(zRwgjO(0x45)),d6m0Ww0(zRwgjO(0x46)),d6m0Ww0(0x9b),d
2024-10-18 01:35:57 +00:00
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