mirror of https://github.com/6dylan6/jdpro.git
7 lines
185 KiB
JavaScript
7 lines
185 KiB
JavaScript
|
/*
|
||
|
1 6 * * * jd_qszd.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('轻松赚豆');
|
||
|
function _0x2732(){const _0x4036c8=['\x57\x34\x57\x52\x69\x57\x2f\x63\x55\x71','\x57\x34\x4e\x63\x4f\x6d\x6b\x59\x57\x35\x33\x64\x4e\x58\x72\x39\x57\x36\x52\x63\x4d\x4c\x57','\x57\x4f\x62\x6a\x57\x50\x62\x68\x44\x4d\x70\x63\x48\x47','\x63\x38\x6f\x34\x57\x51\x78\x63\x47\x61\x6e\x64','\x77\x43\x6f\x4e\x57\x50\x4c\x6a\x6c\x57','\x57\x34\x79\x70\x6a\x59\x42\x64\x4f\x66\x54\x79\x42\x61','\x62\x53\x6f\x52\x57\x52\x46\x63\x4f\x57\x66\x42\x57\x4f\x56\x64\x47\x4a\x44\x2b\x57\x50\x6c\x64\x54\x61\x4f','\x57\x34\x5a\x64\x56\x6d\x6f\x71\x62\x65\x71','\x57\x4f\x48\x7a\x57\x50\x39\x6e\x79\x78\x34','\x57\x36\x6c\x63\x4f\x4d\x74\x64\x4e\x31\x78\x63\x4a\x73\x71\x79\x57\x51\x53','\x57\x37\x2f\x64\x4e\x53\x6f\x4e\x69\x31\x6c\x64\x4b\x43\x6f\x78\x57\x50\x53','\x68\x6d\x6f\x54\x57\x36\x4a\x63\x51\x6d\x6b\x77\x57\x50\x2f\x64\x4e\x61','\x61\x5a\x65\x57\x57\x4f\x58\x71\x73\x61','\x57\x37\x4b\x6e\x57\x52\x47\x30\x57\x37\x6d','\x57\x50\x35\x36\x74\x59\x4a\x64\x49\x58\x6c\x64\x52\x61\x53','\x57\x51\x43\x35\x57\x37\x61\x78\x41\x43\x6b\x2b\x46\x58\x4a\x64\x54\x73\x74\x63\x55\x4b\x2f\x64\x52\x71\x6d\x72\x78\x33\x61','\x43\x68\x56\x64\x47\x6d\x6b\x62\x57\x50\x53','\x78\x78\x34\x35\x57\x37\x43\x46','\x57\x51\x33\x63\x47\x43\x6f\x62\x57\x52\x58\x4c\x45\x32\x71','\x62\x43\x6f\x54\x57\x36\x4a\x63\x52\x57','\x57\x4f\x57\x44\x6d\x67\x61\x34\x57\x34\x48\x50','\x57\x36\x4c\x2b\x42\x6d\x6b\x31\x78\x61','\x57\x51\x56\x63\x54\x61\x4c\x36\x64\x6d\x6b\x73','\x57\x35\x42\x64\x4d\x38\x6f\x58\x57\x35\x7a\x66','\x62\x6d\x6b\x49\x79\x32\x70\x63\x51\x47','\x57\x34\x70\x64\x4b\x43\x6f\x4a\x57\x34\x7a\x52','\x7a\x53\x6f\x59\x57\x35\x68\x64\x53\x74\x6d','\x57\x51\x43\x4b\x57\x34\x4f\x44\x46\x38\x6b\x2b','\x63\x43\x6f\x7a\x64\x6d\x6b\x54\x57\x37\x56\x64\x4d\x53\x6f\x58\x57\x4f\x72\x72\x57\x50\x5a\x63\x52\x33\x79\x37\x77\x58\x34','\x76\x62\x4e\x63\x49\x53\x6b\x44\x79\x61','\x57\x36\x71\x6e\x57\x4f\x57\x4e','\x44\x53\x6f\x55\x57\x35\x4e\x64\x47\x71\x38','\x6f\x6d\x6b\x52\x78\x66\x75','\x76\x6d\x6f\x76\x57\x36\x42\x63\x4a\x78\x30','\x79\x43\x6b\x32\x57\x35\x6d\x46\x6e\x58\x78\x63\x56\x6d\x6b\x75\x57\x35\x46\x63\x4c\x6d\x6b\x57\x57\x37\x75\x39\x57\x50\x6d','\x62\x38\x6f\x35\x69\x43\x6b\x45\x57\x37\x47','\x41\x53\x6b\x53\x57\x35\x47\x41\x75\x47','\x57\x51\x70\x63\x51\x62\x50\x73\x68\x38\x6b\x68\x76\x53\x6b\x59\x57\x37\x66\x76\x57\x52\x54\x4d\x42\x71\x57\x6d\x6c\x33\x61','\x69\x53\x6b\x52\x71\x4c\x56\x63\x47\x4d\x47\x32\x57\x37\x78\x63\x47\x6d\x6f\x52','\x71\x67\x69\x7a\x6b\x53\x6f\x72\x70\x53\x6f\x42\x57\x4f\x44\x30\x73\x61','\x57\x34\x46\x64\x50\x38\x6f\x59\x69\x67\x71','\x44\x6d\x6b\x37\x57\x37\x5a\x63\x56\x47','\x43\x30\x4a\x64\x53\x38\x6b\x5a\x57\x50\x43','\x75\x53\x6f\x42\x73\x43\x6b\x4f\x44\x48\x33\x64\x54\x53\x6b\x32\x68\x38\x6f\x53','\x65\x38\x6b\x52\x65\x38\x6f\x4c\x63\x47','\x73\x53\x6f\x50\x57\x36\x64\x63\x4e\x65\x56\x63\x50\x53\x6b\x68','\x57\x36\x68\x64\x4b\x38\x6f\x32\x68\x30\x61','\x57\x4f\x79\x56\x57\x4f\x6c\x64\x4a\x38\x6f\x6a','\x57\x52\x35\x68\x57\x50\x4b\x4d\x57\x37\x53\x6f\x57\x35\x70\x63\x47\x6d\x6b\x46\x44\x38\x6b\x6d\x57\x50\x58\x45\x66\x38\x6f\x41\x57\x4f\x66\x74\x57\x37\x6a\x46','\x45\x66\x34\x55\x6d\x31\x4f','\x57\x35\x4f\x41\x69\x5a\x52\x63\x52\x4b\x79','\x57\x51\x4c\x32\x7a\x47\x64\x64\x51\x43\x6b\x70\x57\x34\x79','\x57\x36\x50\x48\x57\x50\x46\x64\x50\x43\x6f\x42','\x57\x51\x78\x64\x50\x43\x6f\x75\x57\x50\x71','\x57\x37\x70\x64\x47\x53\x6f\x32\x69\x66\x78\x64\x55\x6d\x6f\x78\x57\x50\x56\x64\x48\x53\x6f\x63\x76\x53\x6b\x70','\x57\x51\x72\x71\x67\x5a\x35\x71\x57\x4f\x5a\x64\x48\x38\x6b\x34','\x57\x37\x69\x32\x6d\x4b\x64\x64\x49\x76\x4a\x64\x4d\x64\x46\x63\x4a\x74\x43','\x57\x34\x68\x63\x52\x53\x6b\x74\x57\x35\x56\x63\x4c\x6d\x6b\x6e\x57\x52\x56\x4c\x56\x6b\x42\x4c\x50\x6a\x56\x4a\x47\x69\x4e\x4b\x55\x42\x70\x4b\x55\x35\x5a\x4f\x54\x34\x70\x4c\x4a\x79\x43','\x57\x4f\x53\x35\x57\x4f\x37\x64\x51\x47','\x44\x30\x78\x64\x4f\x49\x35\x78\x69\x47','\x57\x50\x66\x38\x78\x72\x52\x64\x51\x58\x52\x64\x55\x61','\x7a\x63\x37\x63\x54\x49\x48\x6d\x6b\x58\x46\x64\x51\x47\x46\x64\x55\x53\x6f\x78\x6d\x6d\x6b\x59\x44\x71','\x57\x34\x61\x79\x57\x34\x43','\x61\x43\x6f\x64\
|
||
|
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
|