mirror of https://github.com/6dylan6/jdpro.git
7 lines
107 KiB
JavaScript
7 lines
107 KiB
JavaScript
|
/*
|
||
|
1 6 * * * jd_wmdou.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('无名小豆');
|
||
|
function hHy_pu(){}var Xj_OWGW=Object['defineProperty'],j1tUQNe,aGr7WFG,glXgDhs,MGYhyzb,eEtVkS,ZdSqJQ,vu00923,J05c40w,i25HJb,jwxBxt,vHY2Lts,lrKU1H,yTgo3bE,AKj_8cl,nhGx8fH,eFcw5m,NupJB7h,Bz8ul1h;function yfEuQjQ(hHy_pu){return j1tUQNe[hHy_pu>0x37?hHy_pu<0x142?hHy_pu<0x142?hHy_pu-0x38:hHy_pu-0x57:hHy_pu-0x52:hHy_pu+0x13]}j1tUQNe=VYxERK();function KgOTV1o(hHy_pu,Xj_OWGW){aGr7WFG(hHy_pu,'length',{value:Xj_OWGW,configurable:!0x0});return hHy_pu}hHy_pu(aGr7WFG=Object.defineProperty,glXgDhs=KgOTV1o(SUBriJ((...Xj_OWGW)=>{var aGr7WFG=SUBriJ(Xj_OWGW=>{return j1tUQNe[Xj_OWGW>0x6?Xj_OWGW>0x6?Xj_OWGW>0x111?Xj_OWGW-0x48:Xj_OWGW-0x7:Xj_OWGW-0x57:Xj_OWGW+0x27]},0x1);hHy_pu(Xj_OWGW.length=yfEuQjQ(0x39),Xj_OWGW[aGr7WFG(0x7)]=Xj_OWGW[0x0]);return Xj_OWGW[0x1](Xj_OWGW[aGr7WFG(0x7)]())}),0x2)(fMuS5_,wRRHWo));var dqn9VS=[],es_8GK=[dE4iQtH(0x0),dE4iQtH(0x1),dE4iQtH(yfEuQjQ(0x39)),dE4iQtH(yfEuQjQ(0x50)),dE4iQtH(0x4),'~*|Mnp>,',dE4iQtH(0x5),dE4iQtH(0x6),dE4iQtH(0x7),dE4iQtH(0x8),dE4iQtH(yfEuQjQ(0xdb)),dE4iQtH(0xa),dE4iQtH(0xb),dE4iQtH(0xc),dE4iQtH(0xd),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@&.|P|a>5VB3dJcO4e0|4LYBDAjf<SZDYq&._hnD&Y3YwhjO!iIQIvs+z_pI}S`OiH&[54_))_L`22mS4eB,g!^C]AJ?l?_',dE4iQtH(yfEuQjQ(0x10f)),dE4iQtH(yfEuQjQ(0xab)),'os+Y4gWh]Plqg$E5D|>x',dE4iQtH(0x4c),dE4iQtH(0x4d),dE4iQtH(0x4e),'8|$jfz}Z',dE4iQtH(0x4f),dE4iQtH(yfEuQjQ(0xac)),'4%niJ;Xg|xEm4H67[a`Y+?YVAY1{mIXbMdl"L,zEVYVj[7ABs%"=G?bh))Szm?lJ;az_U$DMjK*q}Ha6%+@Qe;,?]#.{#7B5O0r2k`tVc0!^if37#%7AW%_m//0HQ,"wI}va|(=VoK~<G{m49xV"+;[w`J?>5XftFpwug?tV.S8',dE4iQtH(0x51),'eYl"j;vV`Y?YifEsQQ&"k`XVW*`>e0r4s3I_Y)>}wnB5EL"23<m`?>#]k]31N^[2C<^&mH0Y//lOk.ua"pjAU;+>oK:<&7U4T2h(K&yhz[:5VPk=p|BtY[PMz]<uN^[2!|n>G8khf%RSqLbvq4,2Dkg%2KEO}vcFb|W(K&yhTqI','emX`k`yMy})q;$@7EmN_*<){{qBe4<J=V+BtZ>fO_[H6}0.4T2(_3YFwMqU_v|j=z*LDOfgey})qfX54`K;_<&!;Mqy>d4i|y_sIb`./^}C}h=@7cGwQK&rO<Y9xKPe|eaou}r9>)0rhr,Z4E(2>Hr3VMq;m~<wr,5kf;,./?[7','K4:AjuE8PqoKaKY=_|?u1E9}^%gj67!LC(A`7I2%$K"`*LTB,5kfTE/]"%O4,Px/0|#HRD/!IOy"(<W5t4m`
|
||
|
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr
|