jdpro/jd_wechat_ttlzq.js

7 lines
109 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-12-01 13:55:43 +00:00
function Y1VBPJQ(){}var JZohYH=Object['defineProperty'],kK1Fp7l,zPHGPdU,Zk18ks,L0XtPJ9,yES01r,NeeEdL,Up3a3U,_j7laY,sWCGLhP,B7TJ7hY,q3tYxnX,XkHq1g,umQ_5G,JHSGGmx,wabr1xA,ABOprT,HDvrkm4;function ESSWlE(Y1VBPJQ){return kK1Fp7l[Y1VBPJQ<-0x12?Y1VBPJQ-0x25:Y1VBPJQ+0x11]}kK1Fp7l=xgoeqV();function OOjQ9T(Y1VBPJQ,JZohYH){zPHGPdU(Y1VBPJQ,ESSWlE(0xf),{value:JZohYH,configurable:!0x0});return Y1VBPJQ}Y1VBPJQ(zPHGPdU=Object.defineProperty,Zk18ks=OOjQ9T(_o5IvCb((...JZohYH)=>{Y1VBPJQ(JZohYH.length=0x2,JZohYH.pP03x4F=JZohYH[0x0]);return JZohYH[0x1](JZohYH.pP03x4F())}),0x2)(wHPLRk,er5DvL));var xqB7IB=[],JDdYdon=[A7LE02(0x0),A7LE02(ESSWlE(0x12)),A7LE02(0x2),A7LE02(0x3),A7LE02(0x4),A7LE02(0x5),A7LE02(ESSWlE(0x34)),A7LE02(ESSWlE(0x1b)),A7LE02(0x8),A7LE02(0x9),'r"|DGNs',A7LE02(0xa),A7LE02(0xb),A7LE02(0xc),A7LE02(0xd),A7LE02(0xe),A7LE02(ESSWlE(-0xf)),A7LE02(0x10),A7LE02(0x11),A7LE02(ESSWlE(-0x10)),A7LE02(0x13),A7LE02(0x14),A7LE02(0x15),A7LE02(0x16),A7LE02(ESSWlE(0x22)),A7LE02(ESSWlE(-0xe)),A7LE02(0x19),A7LE02(0x1a),A7LE02(0x12),A7LE02(0x1b),A7LE02(0x1c),A7LE02(ESSWlE(0x9)),A7LE02(ESSWlE(-0x11)),A7LE02(0x10),A7LE02(ESSWlE(0x32)),A7LE02(0x1b),A7LE02(ESSWlE(-0x11)),A7LE02(0x10),A7LE02(ESSWlE(-0x10)),A7LE02(ESSWlE(0x19)),A7LE02(ESSWlE(0x42)),A7LE02(0x21),A7LE02(0x22),A7LE02(0x23),A7LE02(0x24),A7LE02(0x25),A7LE02(0x26),A7LE02(ESSWlE(0x2a)),A7LE02(0x28),'*|@!>bs',A7LE02(0x18),A7LE02(0x29),A7LE02(0x2a),A7LE02(ESSWlE(0xd)),A7LE02(0x2c),A7LE02(0x2d),A7LE02(ESSWlE(0x25)),A7LE02(0x2f),A7LE02(ESSWlE(0x37)),A7LE02(0x31),A7LE02(0x32),A7LE02(0x33),A7LE02(0x34),A7LE02(0x35),A7LE02(ESSWlE(0x39)),A7LE02(0x37),A7LE02(ESSWlE(0x10)),'W|Dn6|.c,R$V0*Tc}#|pZ',A7LE02(ESSWlE(0x11)),A7LE02(ESSWlE(0x14)),A7LE02(0x18),A7LE02(0x3b),'&#)y#Ot(i,N{fgyVU@=v|Ox',A7LE02(0x3c),A7LE02(0x3d),A7LE02(0x3e),A7LE02(0x3f),A7LE02(0x40),A7LE02(0x41),A7LE02(0x42),A7LE02(0x43),A7LE02(0x44),A7LE02(ESSWlE(0xe)),A7LE02(0x46),A7LE02(0x47),A7LE02(0x48),A7LE02(0x49),A7LE02(0x4a),A7LE02(ESSWlE(0x3f)),A7LE02(0x33),A7LE02(0x34),A7LE02(0x4c),A7LE02(0x4d),A7LE02(0x4e),A7LE02(ESSWlE(0x43)),A7LE02(0x50),A7LE02(0x51),A7LE02(0x52),A7LE02(0x53),'f|~!y9s',A7LE02(0x18),A7LE02(ESSWlE(0xc)),A7LE02(ESSWlE(0x44)),A7LE02(ESSWlE(0x98)),A7LE02(0x56),A7LE02(ESSWlE(0x41)),A7LE02(ESSWlE(0x23)),A7LE02(0x18),A7LE02(0x45),A7LE02(0x18),A7LE02(ESSWlE(0x1a)),A7LE02(0x59),A7LE02(0x24),A7LE02(0x40),A7LE02(0x5a),A7LE02(ESSWlE(0x28)),A7LE02(0x5c),A7LE02(0x5d),A7LE02(0x5e),A7LE02(0x5f),A7LE02(ESSWlE(-0xf)),A7LE02(0x18),A7LE02(0x60),A7LE02(0x61),A7LE02(0x62),A7LE02(0x63),A7LE02(0x64),A7LE02(0x18),A7LE02(0x65),A7LE02(0x66),'uwqI#1^AspP9)5&X1b.YG17m4e~!LNhy|4$',A7LE02(ESSWlE(-0xe)),A7LE02(0x67),'RqM8)o|rm',A7LE02(0x68),A7LE02(0x69),A7LE02(0x6a),A7LE02(ESSWlE(-0xd)),A7LE02(0x6c),A7LE02(0x6d),A7LE02(ESSWlE(0x8)),A7LE02(0x62),A7LE02(ESSWlE(-0xd)),A7LE02(0x6f),A7LE02(0x70),A7LE02(0x71),A7LE02(ESSWlE(0x7a)),A7LE02(0x73),A7LE02(0x74),A7LE02(0x75),A7LE02(0x76),A7LE02(0x77),A7LE02(0x78),A7LE02(0x6f),A7LE02(0x79),A7LE02(0x7a),A7LE02(0x7b),A7LE02(0x7c),A7LE02(0x7d),A7LE02(ESSWlE(0x5c)),A7LE02(0x6a),A7LE02(0x7e),A7LE02(0x62),A7LE02(0x62),A7LE02(0x7f),A7LE02(0x80),A7LE02(ESSWlE(0x50)),A7LE02(ESSWlE(0x4d)),A7LE02(0x82),A7LE02(ESSWlE(0x0)),A7LE02(0x84),A7LE02(0x85),A7LE02(0x86),A7LE02(0x87),A7LE02(0x88),A7LE02(0x89),A7LE02(ESSWlE(-0xb)),A7LE02(0x4a),A7LE02(0x8b),A7LE02(0x8c),A7LE02(0xf),A7LE02(0x8d),A7LE02(0x8e),A7LE02(0x8f),A7LE02(0x90),A7LE02(0x91),A7LE02(0x92),A7LE02(0x93),A7LE02(ESSWlE(0x3)),A7LE02(0x95),A7LE02(0x2d),A7LE02(0x96),A7LE02(0x97),'Ny|E(>4</4HnE)',A7LE02(0x98),A7LE02(ESSWlE(-0x2)),A7LE02(0x9a),A7LE02(0x9b),'!H"b|76du4+<4$+#ds','}8+>@G4g}p[/f/)yfv|',A7LE02(0x9c),A7LE02(0x9d),A7LE02(0x9e),A7LE02(ESSWlE(0x5)),A7LE02(ESSWlE(0x5b)),A7LE02(ESSWlE(-0x9)),A7LE02(0xa2),'|Dm[Jbs','3`EUD+|d9A"M&bqQ_Aa=^ck',A7LE02(ESSWlE(0x5e)),A7LE02(0xa4),A7LE02(ESSWlE(0x64)),A7LE02(0xa6),A7LE02(0xa7),A7LE02(0xa8),A7LE02(ESSWlE(-0xc)),A7LE02(0x18),A7LE02(0xaa),A7LE02(0xab),A7LE02(0x18),'U|aD]',A7LE02(0xac),A7LE02(0xad),A7LE02(0x18),A7LE02(0xae),A7LE02(0xaf),A7LE02(ESSWlE(-0xc)),A7LE02(0xb0),A7LE02(0xb1),A7LE02(0x82),A7LE02(0x83),A7LE02(0x84),A7LE02(0x85),
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