mirror of https://github.com/6dylan6/jdpro.git
10 lines
45 KiB
JavaScript
10 lines
45 KiB
JavaScript
|
/*
|
|||
|
互动消息检测
|
|||
|
仅检测,有豆到APP-我的-消息-互动消息去完成任务
|
|||
|
https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_hdcheck.js
|
|||
|
updatetime:22023/08/24 屏蔽无用消息
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('互动消息检查');
|
|||
|
const _0xf90bae=_0x4bac;(function(_0x13fba5,_0x348e04){const _0x5dfe7a=_0xf90bae,_0x4ca6b7=_0x3817();while(!![]){try{const _0x529705=-parseInt(_0x5dfe7a('0x251','Z$6B'))/(-0x5fb+-0x1498+-0x36*-0x7e)+parseInt(_0x5dfe7a('0x203','Oc[5'))/(0x396+-0x493+0x11*0xf)*(-parseInt(_0x5dfe7a('0x1d6','UO&c'))/(-0x1*0x13b1+-0x4ff+0x18b3*0x1))+-parseInt(_0x5dfe7a('0x12a','I)eq'))/(-0x1de5+0x1148+-0x35*-0x3d)+-parseInt(_0x5dfe7a('0x24c','XWUN'))/(0x4*0x805+-0x2ab*-0x6+0x6b*-0x73)+parseInt(_0x5dfe7a('0x1a7','MUZo'))/(-0xb06*-0x3+0x257c+-0x4688)*(-parseInt(_0x5dfe7a('0x14e','n8s9'))/(0x20ff*-0x1+-0x38f*-0x3+0x1659))+-parseInt(_0x5dfe7a('0x1cd','#(3G'))/(0xd87+-0x671+-0x6*0x12d)*(-parseInt(_0x5dfe7a('0xf7','bxO&'))/(-0x180e+0x9d*-0x2f+-0x1*-0x34ea))+parseInt(_0x5dfe7a('0x12d','MUZo'))/(0x83*0x33+0x1aed+-0x34fc*0x1);if(_0x529705===_0x348e04)break;else _0x4ca6b7['push'](_0x4ca6b7['shift']());}catch(_0xb016a8){_0x4ca6b7['push'](_0x4ca6b7['shift']());}}}(_0x3817,-0x2*0x2b169+0x2b43b*-0x4+0x1949b3));const _0x5f23a2=$[_0xf90bae('0x1ce','msAr')]()?require(_0xf90bae('0x1b7','x7z$')):'',_0xbf28e6=$[_0xf90bae('0x243','K&Kl')]()?require(_0xf90bae('0x184','Oc[5')):'',_0x1ec1de=require(_0xf90bae('0x182','npE)')),_0x8fbcc4=require(_0xf90bae('0x1e8','N8DT')),_0x3680a2=require(_0xf90bae('0x11d','I0M6'));let _0x48cde8=!![],_0x315a64=[],_0x5c6a48='',_0x1b20b7='';if($[_0xf90bae('0x14a','vwZS')]()){Object[_0xf90bae('0x134','p)$l')](_0xbf28e6)[_0xf90bae('0xc8','gQT0')](_0x11fa1e=>{const _0x42ab9d=_0xf90bae;_0x315a64[_0x42ab9d('0x13e','bxO&')](_0xbf28e6[_0x11fa1e]);});if(process[_0xf90bae('0x12f','mfPS')][_0xf90bae('0x1a2','5Q^V')]&&process[_0xf90bae('0x244','bxO&')][_0xf90bae('0xb1','mq(8')]===_0xf90bae('0x1d7','Jz@x'))console[_0xf90bae('0x1fc','mq(8')]=()=>{};}else _0x315a64=[$[_0xf90bae('0xf5','h%cX')](_0xf90bae('0x201','[C$k')),$[_0xf90bae('0xc6','XWUN')](_0xf90bae('0x1c9','Z$6B')),..._0x38734c($[_0xf90bae('0x171','npE)')](_0xf90bae('0x240','Ykm@'))||'[]')[_0xf90bae('0x1f8','Ykm@')](_0x5708c2=>_0x5708c2[_0xf90bae('0xe1','U&8s')])][_0xf90bae('0x196','^P)N')](_0x49bdc2=>!!_0x49bdc2);!(async()=>{const _0x3e5558=_0xf90bae,_0x6a3510={'BuuRl':_0x3e5558('0x162','x7z$'),'UzqWF':_0x3e5558('0x1ff','p)$l'),'SMhwS':function(_0x3226a4,_0x23ccbd){return _0x3226a4<_0x23ccbd;},'SSWuS':function(_0x235923){return _0x235923();},'lBqay':_0x3e5558('0x1d4','B#NQ'),'maAoV':function(_0x4db27f,_0xcdc8c){return _0x4db27f===_0xcdc8c;},'AYUFo':function(_0x1756af,_0x159450){return _0x1756af!==_0x159450;},'FTZak':_0x3e5558('0xc1','I0M6')};if(!_0x315a64[0x11ad+-0x1c0*-0x7+0x2f*-0xa3]){$[_0x3e5558('0x125','I)eq')]($[_0x3e5558('0xd2','[Hl%')],_0x6a3510[_0x3e5558('0xb9','X6ox')],_0x6a3510[_0x3e5558('0x104','gQT0')],{'open-url':_0x6a3510[_0x3e5558('0x20a','%8P*')]});return;}$[_0x3e5558('0x1ad','[C$k')](_0x3e5558('0x19e','OxL*'));for(let _0x3f252d=-0x29*-0xda+0x8*0x48e+-0x475a;_0x6a3510[_0x3e5558('0x10b','N8DT')](_0x3f252d,_0x315a64[_0x3e5558('0xc4','XM!Z')]);_0x3f252d++){if(_0x315a64[_0x3f252d]){_0x5c6a48=_0x315a64[_0x3f252d],$[_0x3e5558('0xba','MUZo')]=decodeURIComponent(_0x5c6a48[_0x3e5558('0x113','XWUN')](/pt_pin=([^; ]+)(?=;?)/)&&_0x5c6a48[_0x3e5558('0x1b5','X%Xo')](/pt_pin=([^; ]+)(?=;?)/)[-0x1f36+-0x36*-0x78+0x5e7]),$[_0x3e5558('0x21e','Jz@x')]=_0x3f252d+(-0x70*0x44+0x5e*-0x19+-0x1*-0x26ef),$[_0x3e5558('0xf3','I)eq')]=!![],$[_0x3e5558('0x1e2','y4Fw')]='',$[_0x3e5558('0x16e',']2GJ')]=[],$[_0x3e5558('0x20e','I)eq')]=[],$['UA']=_0x1ec1de[_0x3e5558('0x22d','h%cX')]?_0x1ec1de[_0x3e5558('0xf4','rXYR')]():_0x1ec1de[_0x3e5558('0x1e7','B#NQ')],await _0x6a3510[_0x3e5558('0x143','B#NQ')](_0x350d07),console[_0x3e5558('0x224',']2GJ')](_0x3e5558('0x140','XM!Z')+$[_0x3e5558('0x1f9','2T%B')]+'】'+($[_0x3e5558('0x19b','#(3G')]||$[_0x3e5558('0x212','2T%B')])+_0x3e5558('0x1d5','2T%B'));if(!$[_0x3e5558('0x1a0','Oc[5')]){const _0x39a02d={};_0x39a02d[_0x3e5558('0x18b',')%%]')]=_0x3e5558('0x17c','UO&c'),$[_0x3e5558('0xb6','[C$k')]($[_0x3e5558('0x164','^P)N')],_0x3e5558('0x17b','[Hl%'),_0x3e5558('0x105','vwZS')+$[_0x3e5558('0x1f9','2T%B')]+'\x20'+($[_0x3e5558('0x1eb','B*GZ')]||$[_0x3e5558('0x122','ewVz')])+_
|
|||
|
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
|