jdpro/jd_hdcheck.js

10 lines
66 KiB
JavaScript
Raw 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-10-19 15:24:01 +00:00
function tVRE2Kp(){}var Ajpdf4c=Object['defineProperty'],HZifJpu,LXConjR,fOrzggZ,iEFK0fl,SWoYmFb,aFbZaX,YJlC8cK,QvHgc9L,AskSJKb,nb7QJjf,MPbSPBD,kJdrCu,IpFPAza,w8L7sj2,A6tEX4,AuK9caY,KdXllx,o1dE_9v,KuX3sN,bAGhC9J;function Kt6OO2(tVRE2Kp){return HZifJpu[tVRE2Kp>0x5d?tVRE2Kp+0x57:tVRE2Kp>-0x47?tVRE2Kp<0x5d?tVRE2Kp+0x46:tVRE2Kp-0x60:tVRE2Kp-0x3]}HZifJpu=JYtHt7();function Csqtut(tVRE2Kp,Ajpdf4c){var fOrzggZ=lxxmq7(tVRE2Kp=>{return HZifJpu[tVRE2Kp>0x7c?tVRE2Kp+0xc:tVRE2Kp>0x7c?tVRE2Kp+0x63:tVRE2Kp>0x7c?tVRE2Kp-0x3e:tVRE2Kp+0x27]},0x1);LXConjR(tVRE2Kp,Kt6OO2(-0x46),{value:Ajpdf4c,configurable:fOrzggZ(0x28)});return tVRE2Kp}tVRE2Kp(LXConjR=Object.defineProperty,fOrzggZ=Csqtut(lxxmq7((...Ajpdf4c)=>{tVRE2Kp(Ajpdf4c[Kt6OO2(-0x46)]=0x2,Ajpdf4c.hva60GY=-0x4a);if(Ajpdf4c.hva60GY>0x3){return Ajpdf4c[Ajpdf4c.hva60GY-0xab]}else{var LXConjR=lxxmq7(Ajpdf4c=>{return HZifJpu[Ajpdf4c>0x35?Ajpdf4c<0xd9?Ajpdf4c>0xd9?Ajpdf4c+0x10:Ajpdf4c-0x36:Ajpdf4c+0x4d:Ajpd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OO2(0x2b)),CIlcjg(0x5b),CIlcjg(Kt6OO2(-0x41)),CIlcjg(0x5c),CIlcjg(0x5d),CIlcjg(0x5e),CIlcjg(Kt6OO2(-0x39)),CIlcjg(Kt6OO2(-0x40)),'m8|xK7v0v',CIlcjg(0x60),CIlcjg(Kt6OO2(-0x3b)),CIlcjg(Kt6OO2(-0x1c)),CIlcjg(Kt6OO2(-0x3f)),CIlcjg(0xf),CIlcjg(Kt6OO2(-0x3e)),'{e|x0',CIlcjg(0xf),CIlcjg(0x22),CIlcjg(Kt6OO2(-0x3d)),'<bn):_z{ZE|$<8.COU',CIlcjg(Kt6OO2(-0x3c)),CIlcjg(0x51),CIlcjg(0x62),CIlcjg(0x62),CIlcjg(0x63),CIlcjg(Kt6OO2(0x22)),CIlcjg(0x65),CIlcjg(Kt6OO2(-0x7)),CIlcjg(Kt6OO2(-0x3b)),CIlcjg(0xf),CIlcjg(Kt6OO2(-0x3e)),Kt6OO2(-0x43),CIlcjg(Kt6OO2(0x23)),CIlcjg(Kt6OO2(-0x3)),'KgD|(dmyLJg>L9aQG`(M',CIlcjg(0x68),CIlcjg(0x69),CIlcjg(0x6a),CIlcjg(Kt6OO2(-0x21)),CIlcjg(0x6c),CIlcjg(0x6d),CIlcjg(Kt6OO2(0x2e)),CIlcjg(0x6f),CIlcjg(0x70),CIlcjg(Kt6OO2(0x33)),CIlcjg(0x72),CIlcjg(0x73),CIlcjg(Kt6OO2(-0x37)),CIlcjg(0x75),CIlcjg(0x76),CIlcjg(0x77),CIlcjg(0x78),CIlcjg(Kt6OO2(-0x2a)),'hj4Zm!7*[Lf>W1%ihShmYt1>|L,KiI<l"T1]:_/{',CIlcjg(0x7a),CIlcjg(0x7b),'%bmwd/5#fER3QN,y"mF)Fy**:m_1|{G~v8D
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