jdpro/jd_hdcheck.js

10 lines
65 KiB
JavaScript
Raw Permalink Normal View History

2024-06-28 07:47:44 +00:00
/*
互动消息检测
仅检测有豆到APP-我的-消息-互动消息去完成任务
https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_hdcheck.js
updatetime:22023/08/24 屏蔽无用消息
*/
const $ = new Env('互动消息检查');
2024-11-17 13:09:29 +00:00
function DiRs3z0(){}var ZUPocMe=Object['defineProperty'],O2AMrKM,J1BW_e,m1krco,Mg5AVgN,eZf7tzo,qbNHtr,TjIwWBA,WypaOL,OH0gWEk,kohD5Tb,qfa6dA2,J7SEVc,Q2ypqX9,LA0yck,qw_jRi7,wGP_ebW,fETdKOF,f64b0s7,Et1MD6F,GRc4uTC,xsrAjt;function GFGDpWD(DiRs3z0){return O2AMrKM[DiRs3z0>-0x56?DiRs3z0>-0x56?DiRs3z0<0x25?DiRs3z0<-0x56?DiRs3z0-0x2b:DiRs3z0+0x55:DiRs3z0-0xb:DiRs3z0-0x1:DiRs3z0-0x1b]}O2AMrKM=z5DaQd();function y0H799(DiRs3z0,ZUPocMe){J1BW_e(DiRs3z0,'length',{value:ZUPocMe,configurable:GFGDpWD(-0x27)});return DiRs3z0}DiRs3z0(J1BW_e=Object.defineProperty,m1krco=y0H799(EjPt4B((...ZUPocMe)=>{var J1BW_e=EjPt4B(ZUPocMe=>{return O2AMrKM[ZUPocMe<-0x14?ZUPocMe-0x38:ZUPocMe<0x67?ZUPocMe>0x67?ZUPocMe+0x5f:ZUPocMe<-0x14?ZUPocMe-0x27:ZUPocMe+0x13:ZUPocMe+0x42]},0x1);DiRs3z0(ZUPocMe.length=0x2,ZUPocMe[GFGDpWD(-0x55)]=-J1BW_e(-0x11));if(ZUPocMe[J1BW_e(-0x13)]>ZUPocMe.io_YoMi+GFGDpWD(-0x50)){return ZUPocMe[-0x94]}else{var m1krco=EjPt4B(ZUPocMe=>{return O2AMrKM[ZUPocMe>0x41?ZUPocMe+0x30:ZUPocMe<0x41?ZUPocMe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5d),vyfZ6M(0x15),vyfZ6M(0x5e),'$:Ke|A%|',vyfZ6M(GFGDpWD(-0x35)),vyfZ6M(0x60),vyfZ6M(0x61),vyfZ6M(0x62),'i}7,U4%|',vyfZ6M(0x63),vyfZ6M(GFGDpWD(-0x52)),vyfZ6M(GFGDpWD(0x10)),'I(f6|^s@',vyfZ6M(GFGDpWD(-0x4e)),vyfZ6M(0x53),vyfZ6M(0x61),vyfZ6M(0x12),vyfZ6M(0x1c),vyfZ6M(GFGDpWD(-0x4f)),'_o7~|yZf{UCf2[z^AWQ}+[scRHM:*Kch6.8x]of!m?.am$P^{UH5x49X_F"hGnUrUCHA7caU*`=A{y5lwBE"%M8=r+gbu',vyfZ6M(0x65),vyfZ6M(0x66),vyfZ6M(0x67),vyfZ6M(0x57),vyfZ6M(0x15),vyfZ6M(GFGDpWD(0x11)),vyfZ6M(GFGDpWD(0x2)),vyfZ6M(GFGDpWD(0x20)),vyfZ6M(0x6b),vyfZ6M(0x6c),vyfZ6M(GFGDpWD(0x12)),vyfZ6M(0x6e),vyfZ6M(0x6f),vyfZ6M(0x38),vyfZ6M(0x61),vyfZ6M(0x70),vyfZ6M(GFGDpWD(-0x4d)),vyfZ6M(0x71),vyfZ6M(GFGDpWD(-0x52)),vyfZ6M(0x72),vyfZ6M(GFGDpWD(-0x4d)),vyfZ6M(GFGDpWD(-0x4c)),vyfZ6M(0x1d),vyfZ6M(0x12),vyfZ6M(GFGDpWD(-0x4b)),vyfZ6M(0x2b),vyfZ6M(0x73),vyfZ6M(GFGDpWD(-0x3b)),vyfZ6M(0x74),vyfZ6M(0x38),vyfZ6M(0x12),vyfZ6M(GFGDpWD(-0x7)),vyfZ6M(0x46),'8_a9K[7jBC3RJ.|48_a9',vyfZ6M(GFGDpWD(-0x4a)),vyfZ6M(0x76),vyfZ6M
2024-06-28 07:47:44 +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