jdpro/jd_zwb.js

7 lines
162 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
2024-10-03 13:31:06 +00:00
22 8 * * * jd_zwb.js
2024-06-28 07:47:44 +00:00
*/
const $ = new Env('做任务赚汪贝');
2024-11-20 11:06:06 +00:00
function sLMeeT3(){}var g8ACNq=Object['defineProperty'],bT4bRw,ftKrXDI,SMY8VML,VRWiyZC,D10Fjg7,dFQfix,C8ESe6,VenWDzl,rwc7QYy,zMKMqEi,NyRxsy,gmj47R,I_PZdkP,MlPiJ5,DnAEZOL,kOiZoE,P5vx4y9,er9Elc,BYMdQj,OEEd83;function fZlRF1A(sLMeeT3){return bT4bRw[sLMeeT3>0x2c3?sLMeeT3+0x60:sLMeeT3<-0x40?sLMeeT3-0x56:sLMeeT3<-0x40?sLMeeT3+0x55:sLMeeT3<-0x40?sLMeeT3-0x54:sLMeeT3+0x3f]}bT4bRw=UWJvECw();function ISWWDb5(sLMeeT3,g8ACNq){return ftKrXDI.call(fZlRF1A(0x59),sLMeeT3,fZlRF1A(-0x3f),{value:g8ACNq,configurable:fZlRF1A(0x5d)})}sLMeeT3(ftKrXDI=Object.defineProperty,SMY8VML=ISWWDb5(CVLQLD((...g8ACNq)=>{var ftKrXDI=CVLQLD(g8ACNq=>{return bT4bRw[g8ACNq>0x2b7?g8ACNq+0x2d:g8ACNq<-0x4c?g8ACNq-0x1a:g8ACNq+0x4b]},0x1);sLMeeT3(g8ACNq[fZlRF1A(-0x3f)]=fZlRF1A(-0x3d),g8ACNq[ftKrXDI(-0x4a)]=g8ACNq[fZlRF1A(-0x3c)]);return g8ACNq[ftKrXDI(-0x47)](g8ACNq[ftKrXDI(-0x4a)]())}),fZlRF1A(-0x3d))(fpyfuUs,FtMwHog));var VYSPabm=[],jRKxt9=[NJSw8r(fZlRF1A(-0x3c)),NJSw8r(fZlRF1A(-0x3b)),NJSw8r(fZlRF1A(-0x3d)),NJSw8r(fZlRF1A(0x22)),NJSw8r(fZlRF1A(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0x4e)),NJSw8r(fZlRF1A(0x4f)),NJSw8r(fZlRF1A(-0x2f)),NJSw8r(fZlRF1A(-0x2e)),NJSw8r(fZlRF1A(0x51)),NJSw8r(fZlRF1A(0x103)),NJSw8r(fZlRF1A(0xd6)),'W9S5n|5R=Z_',NJSw8r(fZlRF1A(0x106)),NJSw8r(fZlRF1A(0x107)),NJSw8r(fZlRF1A(0x108)),NJSw8r(fZlRF1A(0x94)),NJSw8r(fZlRF1A(-0x34)),NJSw8r(fZlRF1A(0x40)),NJSw8r(fZlRF1A(0x109)),NJSw8r(fZlRF1A(0x55)),'=td{k|]:R',NJSw8r(fZlRF1A(0x3f)),NJSw8r(fZlRF1A(0xda)),NJSw8r(fZlRF1A(0xaf)),'CzJ*YS|7p,Z}+k}6Ww@7',NJSw8r(fZlRF1A(0xb8)),NJSw8r(fZlRF1A(0xd3)),NJSw8r(fZlRF1A(-0x37)),NJSw8r(fZlRF1A(0xf)),NJSw8r(fZlRF1A(0xc3)),NJSw8r(fZlRF1A(0x10f)),NJSw8r(fZlRF1A(-0x26)),NJSw8r(fZlRF1A(0x87)),NJSw8r(fZlRF1A(-0x24)),NJSw8r(fZlRF1A(0x105)),NJSw8r(fZlRF1A(-0x22)),NJSw8r(fZlRF1A(0xce)),NJSw8r(fZlRF1A(-0x2b)),NJSw8r(fZlRF1A(-0x20)),NJSw8r(fZlRF1A(-0x25)),NJSw8r(fZlRF1A(-0x23)),NJSw8r(fZlRF1A(0xb3)),'I;e7)ic}Wxp,I+>=XKHy`|4','+IcWJ`i|vy|B{?XTK9wB6U4',
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