jdpro/jd_wechat_ttlzq.js

7 lines
113 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-09-29 03:12:01 +00:00
function rvDq4QV(){}var Ah2VUv=Object['defineProperty'],OvUmYa4,y4JDk20,NG4LbA,ApHYEA,NJy0MS,kv94Yfu,nEV1AO,JRKT2ic,oK9u_vb,bfEtBs,VxmuT_b,syCPlL,t6I64l,YkpoSvd,g7f6n5,p72VVmc,xA9722B;function d8YAT0(rvDq4QV){return OvUmYa4[rvDq4QV>-0x59?rvDq4QV>-0x59?rvDq4QV>-0x59?rvDq4QV>-0x59?rvDq4QV+0x58:rvDq4QV-0x1c:rvDq4QV+0x1f:rvDq4QV+0x3a:rvDq4QV+0x13]}OvUmYa4=GYU5ePC();function vnodDr(rvDq4QV,Ah2VUv){var NG4LbA=qfAKrcw(rvDq4QV=>{return OvUmYa4[rvDq4QV<0x18b?rvDq4QV-0x62:rvDq4QV-0x2c]},0x1);y4JDk20(rvDq4QV,NG4LbA(0xa8),{value:Ah2VUv,configurable:!0x0});return rvDq4QV}rvDq4QV(y4JDk20=Object.defineProperty,NG4LbA=qfAKrcw((rvDq4QV,Ah2VUv)=>{return Ah2VUv(rvDq4QV())},0x2)(YCMjEG4,rlLZKz));var iT4u4x=[],CIiMpX8=[mdgLsA(0x0),mdgLsA(0x1),mdgLsA(d8YAT0(-0x25)),'7itq3|ND',mdgLsA(d8YAT0(-0x1b)),mdgLsA(d8YAT0(-0x27)),mdgLsA(d8YAT0(-0x9)),mdgLsA(d8YAT0(-0x1e)),mdgLsA(d8YAT0(-0x13)),mdgLsA(0x8),mdgLsA(0x9),mdgLsA(d8YAT0(0x7f)),mdgLsA(0xb),mdgLsA(d8YAT0(-0x1c)),mdgLsA(d8YAT0(-0x16)),mdgLsA(d8YAT0(-0xe)),mdgLsA(0xf),mdgLsA(d8YAT0(-0x18)),mdgLsA(d8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0x36),'5s+|#K_R',mdgLsA(0x37),mdgLsA(0x38),mdgLsA(0x39),mdgLsA(0x3a),mdgLsA(0x3b),mdgLsA(d8YAT0(0x2b)),mdgLsA(d8YAT0(0xe)),mdgLsA(d8YAT0(0x4c)),mdgLsA(d8YAT0(-0x1d)),mdgLsA(0x40),mdgLsA(0x3b),mdgLsA(0x41),mdgLsA(d8YAT0(0x12)),mdgLsA(d8YAT0(0x13)),mdgLsA(0x44),'|D8vw>e]0[I',mdgLsA(d8YAT0(0xc)),mdgLsA(d8YAT0(0x17)),mdgLsA(d8YAT0(0x1b)),mdgLsA(0x47),mdgLsA(0x48),mdgLsA(d8YAT0(0x1d)),mdgLsA(d8YAT0(0x1e)),mdgLsA(d8YAT0(-0x56)),mdgLsA(0x48),mdgLsA(0x4c),mdgLsA(0x4d),'0hIYoC91%(jO{_|nu4|i',mdgLsA(0xb),'(BWF||mWxV:',mdgLsA(0x4e),mdgLsA(0x4f),mdgLsA(0x50),mdgLsA(d8YAT0(0x1f)),mdgLsA(0x52),mdgLsA(0x4c),mdgLsA(0x53),mdgLsA(0x54),mdgLsA(0x49),mdgLsA(0x4a),mdgLsA(d8YAT0(-0x56)),mdgLsA(d8YAT0(0xc9)),mdgLsA(0x4d),d8YAT0(-0x55),mdgLsA(d8YAT0(0x22)),d8YAT0(-0x55),mdgLsA(d8YAT0(0x20)),mdgLsA(0x47),mdgLsA(d8YAT0(-0x4a)),mdgLsA(d8YAT0(-0x50)),mdgLsA(0x59),mdgLsA(d8YAT0(-0x37)),mdgLsA(0x5a),mdgLsA(d8YAT0(-0x36)),mdgLsA(0x5c),mdgLsA(0x5d),mdgLsA(0x5e),mdgLsA(0x5f),mdgLsA(d8YAT0(0x24)),mdgLsA(0x61),mdgLsA(0x62),mdgLsA(d8YAT0(-0x32)),mdgLsA(0x2d),mdgLsA(d8YAT0(-0x40)),mdgLsA(0x65),mdgLsA(d8YAT0(-0x54)),mdgLsA(0x66),mdgLsA(0x67),mdgLsA(0x68),mdgLsA(0x69),mdgLsA(0x6a),mdgLsA(0x6b),mdgLsA(d8YAT0(-0x52)),mdgLsA(d8YAT0(-0x53)),mdgLsA(0x6d),mdgLsA(d8YAT0(0x2c)),mdgLsA(d8YAT0(0x2d)),mdgLsA(0x70),mdgLsA(0x71),mdgLsA(d8YAT0(0x94)),mdgLsA(d8YAT0(-0x29)),mdgLsA(d8YAT0(0x39)),mdgLsA(d8YAT0(0x91)),'|^[B9Dlk|viNaN{1aY_',mdgLsA(0x76),mdgLsA(0x77),mdgLsA(d8YAT0(0x34)),mdgLsA(d8YAT0(0x35)),mdgLsA(d8YAT0(0x3d)),mdgLsA(d8YAT0(-0x4b)),mdgLsA(0x7c),mdgLsA(0x7d),mdgLsA(0x7e),mdgLsA(d8YAT0(-0x1f)),mdgLsA(d8YAT0(0x40)),mdgLsA(d8YAT0(0x41)),mdgLsA(0x82),mdgLsA(d8YAT0(0x3b)),mdgLsA(0x84),mdgLsA(d8YAT0(-0x51)),mdgLsA(0x85),mdgLsA(0x7d),mdgLsA(0x86),mdgLsA(0x87),mdgLsA(d8YAT0(0xb4)),mdgLsA(d8YAT0(0x51)),mdgLsA(d8YAT0(-0x4f)),mdgLsA(0x5b),mdgLsA(d8YAT0(-0x4e)),mdgLsA(d8YAT0(-0x4d)),mdgLsA(0x8a),mdgLsA(d8YAT0(0x44)),mdgLsA(0x8c),mdgLsA(0x62),mdgLsA(0x63),mdgLsA(0x8d),mdgLsA
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