mirror of https://github.com/6dylan6/jdpro.git
7 lines
58 KiB
JavaScript
7 lines
58 KiB
JavaScript
|
/*
|
||
|
23 1 * * * jd_dygetbeans.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('每日抽豆');
|
||
|
const bdy_0x11c99d=bdy_0x1d50;(function(_0x5a77cf,_0x482309){const bdy_0x2c5b5d={_0x34511c:'0x1ef',_0x14cc97:'i0K0',_0x3a7929:'0x21b',_0xab9f0c:'mYQ[',_0x2d5be8:'0x2a8',_0xb984a4:'gjk2',_0x59ff71:'0x216',_0x38c0df:'DGjf',_0x316edf:'0x2a3',_0x40418b:'T2c$',_0x32a6d3:'0x1c6',_0x170dde:'j00D',_0xbe5805:'0x23c',_0x257342:'&d3V',_0x792f15:'0x2e2',_0x514c1a:'JsEs',_0x55e21c:'0x2cc',_0x5585c4:'pwvk'},_0x3772f8=bdy_0x1d50,_0x18e9dc=_0x5a77cf();while(!![]){try{const _0x405588=-parseInt(_0x3772f8(bdy_0x2c5b5d._0x34511c,bdy_0x2c5b5d._0x14cc97))/(0x1c25+0x90d*0x3+0xb0f*-0x5)+parseInt(_0x3772f8(bdy_0x2c5b5d._0x3a7929,bdy_0x2c5b5d._0xab9f0c))/(-0xb6f+-0x2291+0x2e02)+parseInt(_0x3772f8(bdy_0x2c5b5d._0x2d5be8,bdy_0x2c5b5d._0xb984a4))/(0x211*0x2+-0x5c9*-0x1+-0x9e8)*(-parseInt(_0x3772f8(bdy_0x2c5b5d._0x59ff71,bdy_0x2c5b5d._0x38c0df))/(0x62+-0x1*0x6df+0x681))+parseInt(_0x3772f8(bdy_0x2c5b5d._0x316edf,bdy_0x2c5b5d._0x40418b))/(-0x1*0x2263+0xfbd+0x639*0x3)+parseInt(_0x3772f8(bdy_0x2c5b5d._0x32a6d3,bdy_0x2c5b5d._0x170dde))/(-0x1737+0x9d*-0x1+0x8e*0x2b)*(parseInt(_0x3772f8(bdy_0x2c5b5d._0xbe5805,bdy_0x2c5b5d._0x257342))/(-0xab1+0x1978+-0x8*0x1d8))+parseInt(_0x3772f8(bdy_0x2c5b5d._0x792f15,bdy_0x2c5b5d._0x514c1a))/(-0x3*-0x99e+0x50a+-0x4*0x877)+-parseInt(_0x3772f8(bdy_0x2c5b5d._0x55e21c,bdy_0x2c5b5d._0x5585c4))/(-0xa7*0x1b+0xcd1+0x4d5);if(_0x405588===_0x482309)break;else _0x18e9dc['push'](_0x18e9dc['shift']());}catch(_0x510526){_0x18e9dc['push'](_0x18e9dc['shift']());}}}(bdy_0x5730,-0x2c9*-0x93+-0x121f8*-0xe+-0x1*0x69e0f));function bdy_0x5730(){const _0x1d9e65=['WPdcKCopoa','W6v8W4JcTW1uW7JcPa','bHpdKKxcOW','W6S2W4FcG3DgWOi2p8kDWRKm','pL46W4OpWQa8C0ig','W4/cK8oWWRBOR4NMSiVLP7ROTkpVVjFORkdMORlMNk/NV57OTkpPHyFORR8','FqD8WO9cW6n4','6AgS6zI+56Yt57Mw5P+t6ygZ6l+c772i','wef0D+IUGoAYTowKRUI1PU+9VoITO+AIR+ACOoE/OoI0G+MhJEITKW','WOKjW67cNG','W4lORBNPHzlMLQJNMzRLVOFOJPNLJjS0eGddQCkqqSkxW4/dMgLOW7BcT0HdygfFbmklkbJdSZpdQIZcTmk/W5tdKKVdSd8gW5iJW6XNespcVvzLW78','WOKBawdcSa','f8ohyXpdJZSBW5PvzJNdPSoYvCoWWOpcNGNdPSo9W4NdTrZcUfldVL/cTWxcVSolW7qfWPVcOw7dUSoUDZNcNmoYW4C','xeNcHHxdVSoJgSkoaevqW74','usVcP8okW7/dSmk0zmoKiqXmW4hdNhxdHfXkA2a4iCkdw8o1W5rygW/cPmowWQXMyCoPWRLRWPfyvs9WlW','bCk3W5O','bSkoy8kWiZqpmCkvss45hWdcJSoQzSoGoxVcNH4GWRu4W6dcIfTKFmomxvNdRW','a8krW5dcG8k7WPe','6Aoq6zUP56+N57Mm5P2U6ygr6l6F','otiKW77dRG','W7bUpmoSWQe','W67cLCk0Cc0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kxNdTIrpq8oNW7pcH8oNW4r/W6lcOLZcKCofWP3cJsago8omlSofwJO+W48UDqLnW7pcKSoJWPdcUqJdVmkbW4JdL8okmSk2W49Wt2jrW4dcU8okW5hcH8onWQqsWPyaBmoytZVcLLRcMulcUSkr','fMfjwW','WP57W7CJW6BcTmkphxC','u3zQWOJdMhHp','xNSGbcu','gmoFW4mkWOpcQG','EhJdIa','WPH6W7ivW5mZWRHAjZhcMr8','k1VdP1q9','odBcPSknW4u','WRfLAhTw','WQ8hW7dcJW','W4TmWRFdGmkfW7lcV+w9NowNOEoaR+s6MUs5LoI0JEwmSW','mCo9zSkIWPe','umoWW7PwmL/dRCk+yWC9','uMbhWOpdMMns','t3Dk','WOPUrKO','kSkWWPRdNdaIeINdTSkH','W55MW47cRG1uW7JcPa','rmoyWRhdSKS','W5KJWO08W50','W6S6WONcHSkpW7Pe','BGf0CvJdNCkvr8kWktJdRG','W64RWOuJW78','W7fjgConWRq','DCohW7VcUWK','W798W4BcUsXaW6e','WOv4xK4R','WOHpxhuV','W7PmW6tcQsC'
|
||
|
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
|