jdpro/jd_wechat_ttlzq.js

7 lines
136 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
小程序-超级省
35 4,16 * * * jd_wechat_ttlzq.js
*/
const $ = new Env("小程序超级省");
2024-11-10 04:36:30 +00:00
function KhJuRy(){}var Jldw9Z=Object['defineProperty'],FN38NgT,R06Mbj,ZnoYRyi,LantfSg,xx8RYy,yIg3BSp,LMGkkxW,K0uByh5,b2wuji,iIVm96,HuaYf9,sXgIpH,sWInXb,UFiwcwX;function bmeWrhD(KhJuRy){return FN38NgT[KhJuRy>-0x3a?KhJuRy<0x163?KhJuRy+0x39:KhJuRy-0x48:KhJuRy+0x60]}FN38NgT=PzALUCt();function R9DytlL(KhJuRy,Jldw9Z){R06Mbj(KhJuRy,'length',{value:Jldw9Z,configurable:!0x0});return KhJuRy}KhJuRy(R06Mbj=Object.defineProperty,ZnoYRyi=R9DytlL(wlq_pE((...Jldw9Z)=>{var R06Mbj=wlq_pE(Jldw9Z=>{return FN38NgT[Jldw9Z>-0x6?Jldw9Z+0x5:Jldw9Z-0x6]},0x1);KhJuRy(Jldw9Z[bmeWrhD(0x11)]=R06Mbj(-0x5),Jldw9Z[0xbe]=-R06Mbj(0xa0));if(Jldw9Z[0xbe]>-R06Mbj(0x2d)){return Jldw9Z[R06Mbj(0xa8)]}else{var ZnoYRyi=wlq_pE(Jldw9Z=>{return FN38NgT[Jldw9Z>-0x25?Jldw9Z<0x178?Jldw9Z>-0x25?Jldw9Z>0x178?Jldw9Z-0x36:Jldw9Z+0x24:Jldw9Z-0x30:Jldw9Z+0x34:Jldw9Z-0x7]},0x1);return Jldw9Z[0x1](Jldw9Z[Jldw9Z[Jldw9Z[ZnoYRyi(-0x11)]+R06Mbj(0x2e)]+0x93]())}}),bmeWrhD(-0x39))(Ff2xYOH,MdeUP0Q));var HUZndcD=[],PzAvBvt=[UANVGI(bmeWrhD(-0x4)),UANVGI(bmeWrhD(-0x5)),UANVGI(bmeWrhD(-0x39)),UANVGI(bmeWrhD(0x3)),UANVGI(0x4),UANVGI(0x5),'A67j/qI|',UANVGI(0x6),UANVGI(bmeWrhD(0xf)),UANVGI(bmeWrhD(0x1a)),UANVGI(0x9),UANVGI(0xa),UANVGI(bmeWrhD(0x146)),UANVGI(0xc),UANVGI(0xd),UANVGI(0xe),UANVGI(bmeWrhD(0xd7)),UANVGI(bmeWrhD(0x24)),UANVGI(0x11),UANVGI(0x12),UANVGI(0x13),UANVGI(0x14),UANVGI(0x15),UANVGI(0x16),UANVGI(0x17),UANVGI(0x18),UANVGI(0x19),UANVGI(bmeWrhD(-0x2f)),UANVGI(0x1b),UANVGI(0x1c),UANVGI(bmeWrhD(0x55)),UANVGI(bmeWrhD(-0x36)),UANVGI(bmeWrhD(0x37)),UANVGI(0x1f),UANVGI(0x20),UANVGI(0x21),UANVGI(0x22),UANVGI(0x23),UANVGI(bmeWrhD(0x5)),UANVGI(bmeWrhD(0x3c)),UANVGI(0x26),UANVGI(bmeWrhD(0x3e)),UANVGI(bmeWrhD(0x2d)),UANVGI(bmeWrhD(0x18)),UANVGI(0x2a),UANVGI(0x2b),UANVGI(bmeWrhD(0x3f)),UANVGI(bmeWrhD(0x36)),UANVGI(0x2e),UANVGI(0x2f),UANVGI(bmeWrhD(0xb4)),UANVGI(0x31),'wK($eWozS,)&[u/5);taKN&hm|Ys|2Tk*)ui.Dx7CM/0SghxqS{q4',UANVGI(0x32),'Ud#l*p}Nbl.!s)a|uBmtvTvB}MD]u(sp[{SDuk3!Oxt^8ql/~F]S','spmypaW_Jk(!|=y.2EnMoaSzF>3|!).G[=[/:Y^IG7sc`<6.J=pMM%j',UANVGI(bmeWrhD(0x41)),UANVGI(0x34),UANVGI(0x35),UANVGI(bmeWrhD(-0x2a)),UANVGI(0x37),UANVGI(0x38),UANVGI(0x39),UANVGI(0x3a),UANVGI(0x3b),UANVGI(0x3c),UANVGI(0x3d),'Q>&|(',UANVGI(bmeWrhD(0x48)),UANVGI(bmeWrhD(-0x1)),UANVGI(bmeWrhD(0x105)),'|o:7yvL',UANVGI(0x32),UANVGI(0x23),UANVGI(bmeWrhD(0x30)),UANVGI(bmeWrhD(0x4a)),UANVGI(bmeWrhD(0x2a)),UANVGI(0x21),UANVGI(bmeWrhD(-0x37)),UANVGI(0x21),UANVGI(0x21),UANVGI(0x44),'_o[7|2QYP^a:_q<{uj','_o[7|2QY',UANVGI(bmeWrhD(0x62)),UANVGI(bmeWrhD(0xbf)),UANVGI(0x46),UANVGI(0x47),UANVGI(0x48),UANVGI(bmeWrhD(-0x8)),UANVGI(0x32),UANVGI(0x34),UANVGI(0x49),UANVGI(0xf),UANVGI(bmeWrhD(0x51)),UANVGI(bmeWrhD(-0x38)),UANVGI(0x4b),UANVGI(0x4c),UANVGI(bmeWrhD(0x52)),UANVGI(0x4e),UANVGI(0x4f),UANVGI(bmeWrhD(0x5e)),UANVGI(bmeWrhD(0x61)),UANVGI(0x52),UANVGI(bmeWrhD(0xe)),UANVGI(0x54),UANVGI(0x55),UANVGI(0x56),UANVGI(0x32),'X?<]%|=^:g',UANVGI(0x57),UANVGI(bmeWrhD(0x17)),UANVGI(0x32),UANVGI(bmeWrhD(0x76)),UANVGI(bmeWrhD(0x77)),UANVGI(bmeWrhD(-0x35)),UANVGI(0x21),UANVGI(bmeWrhD(-0x38)),UANVGI(0x5c),UANVGI(0x5d),UANVGI(0x5e),UANVGI(0x3b),UANVGI(0x5f),UANVGI(0x21),'I?FAc|IY',UANVGI(bmeWrhD(-0x34)),UANVGI(bmeWrhD(-0x37)),UANVGI(bmeWrhD(-0x36)),UANVGI(0x61),UANVGI(bmeWrhD(-0x23)),UANVGI(bmeWrhD(0x7a)),UANVGI(0x64),UANVGI(0x65),UANVGI(bmeWrhD(0x7b)),UANVGI(0x5c),'_o[7|2QYP^a:_q<{uj',UANVGI(bmeWrhD(0x7c)),UANVGI(0x62),UANVGI(0x61),UANVGI(0x5e),UANVGI(bmeWrhD(0x45)),UANVGI(0x65),UANVGI(0x66),UANVGI(0x5f),UANVGI(0x68),UANVGI(bmeWrhD(-0x35)),UANVGI(bmeWrhD(-0x34)),UANVGI(bmeWrhD(0x7d)),UANVGI(0x6a),UANVGI(bmeWrhD(0x80)),UANVGI(bmeWrhD(0x81)),UANVGI(bmeWrhD(-0x33)),UANVGI(bmeWrhD(-0x32)),UANVGI(0x6e),UANVGI(bmeWrhD(-0x31)),UANVGI(0x70),UANVGI(bmeWrhD(0x87)),UANVGI(0x72),UANVGI(0x73),UANVGI(bmeWrhD(0x88)),'On4aW_:||L',UANVGI(0x75),UANVGI(bmeWrhD(0x11c)),UANVGI(bmeWrhD(-0x30)),UANVGI(0x77),UANVGI(0x78),UANVGI(0x79),UANVGI(bmeWrhD(0x1b)),UANVGI(0x7b),'y?tPn(05gs0!+]OyiGLk|>2OHM4+i00p=:zgH#4{dnWsNraM`nC3^6Q{+N/@ppD6)yWsI:IuiA^v*+r','On4a8bIE|L,c(',UANVGI(0x7c),UANVGI(0x7d),'73YyCD~d8N%Nu6et@s5.IUK[92PPttgq*nu@T,qF|Le`wUht]E/_7dnK^$yuQ^|rWWay',UAN
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