jdpro/jd_dygetbeans_.js

7 lines
101 KiB
JavaScript
Raw Normal View History

2024-07-18 01:15:17 +00:00
/*
2024-08-31 01:21:50 +00:00
35 0,7 * * * jd_dygetbeans_.js
2024-07-18 01:15:17 +00:00
*/
const $ = new Env('每日抽豆');
2024-10-31 05:01:30 +00:00
function H6CWfY5(){}var Z0ZCRdS=Object['defineProperty'],Q5ocY4,r3Vc19,ANBONqH,K6PwWx_,dQwhDi,Y2o539d,y6Ye9a8,jCmNdd,S25DW9,oB8f9Dx,oG5A4q,JWV8lNG,GGGPzGO,zbaDx8,NKM16_,fcTNPl,EYuQ35V,vKXElbk,Yun80gQ,Papl91,CFyvy4W,qbNcBk;function cRfgn6(H6CWfY5){return Q5ocY4[H6CWfY5>0x102?H6CWfY5-0x47:H6CWfY5+0x12]}Q5ocY4=M9bnUc();function Wjn_0b(H6CWfY5,Z0ZCRdS){var ANBONqH=CPk9hR(H6CWfY5=>{return Q5ocY4[H6CWfY5>0x113?H6CWfY5-0x15:H6CWfY5>-0x2?H6CWfY5+0x1:H6CWfY5+0x1d]},0x1);return r3Vc19(H6CWfY5,cRfgn6(0x12),{value:Z0ZCRdS,configurable:ANBONqH(0x32)})}H6CWfY5(r3Vc19=Object.defineProperty,ANBONqH=CPk9hR((H6CWfY5,Z0ZCRdS)=>{return Z0ZCRdS(H6CWfY5())},0x2)(uEoIRo,oSHceIQ));var SCYwKz=[],zxhUSvn=[o4vUect(cRfgn6(0x4)),o4vUect(0x1),o4vUect(0x2),o4vUect(cRfgn6(0x2)),o4vUect(cRfgn6(0x0)),o4vUect(cRfgn6(0x8)),o4vUect(cRfgn6(0x1b)),o4vUect(cRfgn6(0x11)),o4vUect(0x8),o4vUect(0x9),'|+o$"%5D',o4vUect(cRfgn6(0x7)),o4vUect(0xb),o4vUect(0xc),o4vUect(0xd),o4vUect(0xe),o4vUect(0xf),o4vUect(0x10),o4vUect(0x11),o4vUect(cRfgn6(0xc)),'_*d/1(19.T~QpDSFAJ1|v$ND',o4vUect(0x13),o4vUect(0x10),o4vUect(cRfgn6(-0x12)),o4vUect(0x15),o4vUect(0x16),o4vUect(0x17),o4vUect(cRfgn6(0x8c)),o4vUect(0x19),o4vUect(0x1a),o4vUect(cRfgn6(0x96)),'LE4o&sfN^@0xl.{!3og+6qCh2hr|]jiF>OqYao_?<I5+vcnEkvZ5}I+L7[S=?iO.RB',o4vUect(cRfgn6(0x3e)),o4vUect(cRfgn6(0x32)),o4vUect(cRfgn6(0x67)),o4vUect(cRfgn6(0x2d)),o4vUect(cRfgn6(-0x10)),o4vUect(cRfgn6(0x8e)),o4vUect(cRfgn6(0x43)),o4vUect(0x23),o4vUect(0x24),o4vUect(0x25),o4vUect(cRfgn6(-0x12)),o4vUect(0x26),o4vUect(0x27),o4vUect(0xf),o4vUect(0x28),o4vUect(0x29),o4vUect(0x2a),o4vUect(cRfgn6(-0xe)),o4vUect(0x2b),o4vUect(0x2c),o4vUect(0x2d),o4vUect(0x2e),o4vUect(cRfgn6(0x4d)),o4vUect(0x30),o4vUect(0x31),'LE4o&sfN^@0xl.{!3og+6qCh2hr|]jiF>OqYao_?<I5+vcnEkvZ5}I+L7[S=?iO.RB',o4vUect(cRfgn6(-0x11)),o4vUect(0x11),o4vUect(cRfgn6(0x54)),o4vUect(0x14),o4vUect(0x13),o4vUect(0x14),o4vUect(cRfgn6(-0x11)),o4vUect(cRfgn6(0x2b)),o4vUect(cRfgn6(0x2c)),o4vUect(0x14),o4vUect(0x17),o4vUect(0x11),o4vUect(0x33),o4vUect(0x34),o4vUect(0x35),o4vUect(cRfgn6(0x58)),o4vUect(cRfgn6(0x59)),o4vUect(0x38),o4vUect(0x39),o4vUect(cRfgn6(0x36)),o4vUect(0x3b),o4vUect(0x3c),o4vUect(cRfgn6(-0xf)),o4vUect(0x3d),o4vUect(0x3e),o4vUect(cRfgn6(0xb)),o4vUect(cRfgn6(0x38)),o4vUect(0x41),o4vUect(0x42),o4vUect(cRfgn6(-0x10)),o4vUect(0x43),o4vUect(cRfgn6(0x6a)),o4vUect(0x45),o4vUect(cRfgn6(0x3b)),o4vUect(0x47),o4vUect(0x48),o4vUect(0x49),o4vUect(cRfgn6(0xf4)),o4vUect(cRfgn6(0x33)),o4vUect(cRfgn6(0x6d)),'jo=huE|B','rfF+3mlYzH,mhHOSUyS|vHucU5m%jMs*e6D','^xasHgEB^1M7;L4<Xoh|P6wVL1Gm^)i6+Xf',o4vUect(0x4d),o4vUect(cRfgn6(0x6f)),'^1?nT$Uw|5l6_f|~yjK,Sm{BJ"$%?jf/?2',o4vUect(0x4f),o4vUect(cRfgn6(0xf0)),o4vUect(0x51),o4vUect(0x52),o4vUect(0x53),o4vUect(0x54),'_~KnYaYh7eI8afs,P#,p$;eYo<|Ma)O~=!D',o4vUect(0x55),o4vUect(cRfgn6(0x50)),o4vUect(cRfgn6(0x71)),o4vUect(0x58),o4vUect(cRfgn6(0x25)),o4vUect(cRfgn6(-0x5)),o4vUect(cRfgn6(0x22)),o4vUect(0x5c),o4vUect(0x5d),o4vUect(0x5e),o4vUect(cRfgn6(0x72)),o4vUect(cRfgn6(0x73)),'1^el:}L)ysQ|M^juyy*Qc!B',o4vUect(0x61),o4vUect(cRfgn6(0x61)),o4vUect(cRfgn6(0x74)),'}j>M|vM0(JMYuQ_.TV',o4vUect(cRfgn6(0x52)),o4vUect(cRfgn6(-0xf)),o4vUect(0x65),o4vUect(0x66),o4vUect(cRfgn6(0xcb)),o4vUect(0x68),o4vUect(cRfgn6(0x3a)),'/RS|Y3z}c',o4vUect(0x25),o4vUect(0x6a),o4vUect(0x6b),o4vUect(cRfgn6(0xc9)),o4vUect(0x6d),o4vUect(0x6e),o4vUect(0x6f),'|+G$A8pEc','LHS|Y3z}c','|+M/"(2','?fM|c$:_c','YKWhM|Q^c','N)#3Y|C^^`','r+=hK|tD',o4vUect(0x70),o4vUect(0x71),o4vUect(cRfgn6(0xee)),o4vUect(cRfgn6(0xe)),o4vUect(0x74),o4vUect(cRfgn6(0x79)),o4vUect(0x76),o4vUect(cRfgn6(0x7a)),o4vUect(0x78),',K_nt|O9{wAuB',o4vUect(0x79),o4vUect(cRfgn6(0x7b)),o4vUect(cRfgn6(0x51)),o4vUect(0x7c),o4vUect(0x7d),o4vUect(0x7e),o4vUect(0x7f),cRfgn6(-0x7),o4vUect(cRfgn6(-0xe)),o4vUect(cRfgn6(0xa)),o4vUect(cRfgn6(-0xf)),'*R,|im5D',o4vUect(cRfgn6(-0xc)),'*R,|imn<X<+WB',o4vUect(cRfgn6(-0xb)),o4vUect(cRfgn6(0xb0)),o4vUect(cRfgn6(-0xd)),cRfgn6(-0x9),o4vUect(0x31),o4vUect(0x83),o4vUect(cRfgn6(-0xd)),o4vUect(0x85),'LHS|Y3z}c','|+M/"(2',o4vUect(cRfgn6(-0x12)),o4vUect(0x86),'*R,|imn<X<+WB','*R,|im5D',o4vUect(cRfgn6(-0xc)),'d~?4p|
2024-08-31 01:21:50 +00:00
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr