mirror of https://github.com/6dylan6/jdpro.git
7 lines
122 KiB
JavaScript
7 lines
122 KiB
JavaScript
|
/*
|
||
|
小程序-超级省
|
||
|
35 4,16 * * * jd_wechat_ttlzq.js
|
||
|
*/
|
||
|
const $ = new Env("小程序超级省");
|
||
|
const bdy_0x4c20f3=bdy_0x14b8;(function(_0x2abdc6,_0x4bff72){const bdy_0x4611e0={_0x2f89e8:'0x11c',_0x5ad38e:'9jeB',_0x2d2762:'0x255',_0x296e59:'X2E*',_0x13ed5a:'0x2e8',_0x3a62d1:'LG!%',_0x2aa860:'0x322',_0x34c48b:'^&Sf',_0xe42273:'0x372',_0x252015:'LPw]',_0x4a4658:'0xc7',_0xea5a9e:'0x242',_0x387af4:'xXnM',_0x1be6d3:'0x260',_0x1374ab:'Q*@r',_0xf72961:'0x2fe',_0x482df4:'qt^u',_0x2f8d3f:'0x3c9',_0x236bde:'nsCT'},_0x1ee5ea=bdy_0x14b8,_0x401e25=_0x2abdc6();while(!![]){try{const _0x19147d=-parseInt(_0x1ee5ea(bdy_0x4611e0._0x2f89e8,bdy_0x4611e0._0x5ad38e))/(-0xe2*-0x13+-0x248+0x1*-0xe7d)+-parseInt(_0x1ee5ea(bdy_0x4611e0._0x2d2762,bdy_0x4611e0._0x296e59))/(-0xd7c+0x2e*0x40+-0x1*-0x1fe)+-parseInt(_0x1ee5ea(bdy_0x4611e0._0x13ed5a,bdy_0x4611e0._0x3a62d1))/(0x1b01+0x1*0x17d5+0x3*-0x10f1)*(parseInt(_0x1ee5ea(bdy_0x4611e0._0x2aa860,bdy_0x4611e0._0x34c48b))/(-0x12be+0x1295+-0x5*-0x9))+parseInt(_0x1ee5ea(bdy_0x4611e0._0xe42273,bdy_0x4611e0._0x252015))/(-0x25ba+-0x1*0x1b47+0x1d*0x23e)*(parseInt(_0x1ee5ea(bdy_0x4611e0._0x4a4658,bdy_0x4611e0._0x5ad38e))/(0x2227*0x1+-0x2007+0x21a*-0x1))+parseInt(_0x1ee5ea(bdy_0x4611e0._0xea5a9e,bdy_0x4611e0._0x387af4))/(0x3*-0xa01+-0x7b1+0x25bb)*(parseInt(_0x1ee5ea(bdy_0x4611e0._0x1be6d3,bdy_0x4611e0._0x1374ab))/(-0x2282+-0xa18*-0x1+0x413*0x6))+-parseInt(_0x1ee5ea(bdy_0x4611e0._0xf72961,bdy_0x4611e0._0x482df4))/(-0x3f+0x216*-0xe+-0x1d7c*-0x1)+parseInt(_0x1ee5ea(bdy_0x4611e0._0x2f8d3f,bdy_0x4611e0._0x236bde))/(0x1a41+-0x2*-0x529+0xc7*-0x2f);if(_0x19147d===_0x4bff72)break;else _0x401e25['push'](_0x401e25['shift']());}catch(_0x32e884){_0x401e25['push'](_0x401e25['shift']());}}}(bdy_0x5824,-0xae61*-0x3+0x3f782+0x6ab*-0x54));const bdy_0x15c8e4=(function(){const bdy_0x536f4c={_0x43aa1c:'0x118',_0x27aa22:'AtOS'};let _0x10138f=!![];return function(_0x4bb9d0,_0x415f69){const _0x47d6b3=_0x10138f?function(){const _0x2cc536=bdy_0x14b8;if(_0x415f69){const _0x20e08f=_0x415f69[_0x2cc536(bdy_0x536f4c._0x43aa1c,bdy_0x536f4c._0x27aa22)](_0x4bb9d0,arguments);return _0x415f69=null,_0x20e08f;}}:function(){};return _0x10138f=![],_0x47d6b3;};}()),bdy_0x26627f=bdy_0x15c8e4(this,function(){const bdy_0x52a28b={_0x7ffa3e:'0x2eb',_0x28e0b6:'4$#F',_0x1f44b7:'0xef',_0x72dfca:'doZ8',_0x5cd5ad:'0x228',_0x4592bd:'X2E*',_0x36732e:'0x3b5',_0x9b9ac1:'doZ8',_0x48a2c9:'0x1f0',_0x38a0c4:'%oOF',_0x3cf69a:'0x314',_0xa9238a:'gCQm',_0x41f2c7:'0x101',_0x2dd96d:'$SL6'},_0x50d44c=bdy_0x14b8;return bdy_0x26627f[_0x50d44c(bdy_0x52a28b._0x7ffa3e,bdy_0x52a28b._0x28e0b6)]()[_0x50d44c(bdy_0x52a28b._0x1f44b7,bdy_0x52a28b._0x72dfca)](_0x50d44c(bdy_0x52a28b._0x5cd5ad,bdy_0x52a28b._0x4592bd))[_0x50d44c(bdy_0x52a28b._0x36732e,bdy_0x52a28b._0x9b9ac1)]()[_0x50d44c(bdy_0x52a28b._0x48a2c9,bdy_0x52a28b._0x38a0c4)](bdy_0x26627f)[_0x50d44c(bdy_0x52a28b._0x3cf69a,bdy_0x52a28b._0xa9238a)](_0x50d44c(bdy_0x52a28b._0x41f2c7,bdy_0x52a28b._0x2dd96d));});bdy_0x26627f();const bdy_0x156966=(function(){const bdy_0x205d9d={_0x3a9d3e:'0x107',_0x3c15ef:'%oOF'};let _0x4ca818=!![];return function(_0xa17280,_0x591ffe){const _0x64381f=_0x4ca818?function(){const _0x2879d2=bdy_0x14b8;if(_0x591ffe){const _0x3f6a4d=_0x591ffe[_0x2879d2(bdy_0x205d9d._0x3a9d3e,bdy_0x205d9d._0x3c15ef)](_0xa17280,arguments);return _0x591ffe=null,_0x3f6a4d;}}:function(){};return _0x4ca818=![],_0x64381f;};}());(function(){const bdy_0x3b6ed7={_0x2dba33:'0x1da',_0x36dde9:'@QlB',_0x53ac72:'0x1c9',_0x28fe0f:'Gq5F',_0x3cd691:'0x278',_0x362838:'xXnM'},bdy_0x4c0b06={_0x1c14fa:'0x367',_0x51f6ba:'wkX*',_0x3ab674:'0x120',_0x2589d4:'^LQb',_0x1d694a:'0x199',_0x6043d7:'tcb@',_0x31266b:'0x2b5',_0x16b767:'(km%',_0x16f005:'0x2ac',_0x19a2f0:'DlL#',_0x274c22:'0x36b',_0x47a854:'S6E9',_0x106c05:'0x198',_0x15bee3:'0x234',_0x8db0de:'LPw]',_0x11d348:'0x3cf',_0x3086f5:'qt^u',_0x25ad13:'0xf4',_0x4e062c:'jr^T',_0x27c023:'0x36f',_0x5b16f0:'xXnM'},_0x37c41e=bdy_0x14b8,_0x481322={};_0x481322[_0x37c41e(bdy_0x3b6ed7._0x2dba33,bdy_0x3b6ed7._0x36dde9)]=function(_0x1421ca,_0x22d3f8){return _0x1421ca+_0x22d3f8;},_0x481322[_0x37c41e(bdy_0x3b6ed7._0x53ac72,bdy_0x3b6ed7._0x28fe0f)]=_0x37c41e(bdy_0x3b6ed7._0x3cd691,bdy_0x3b6ed7._0x362838);const _0x352
|
||
|
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
|