jdpro/jd_dygetbeans_.js

7 lines
98 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-09-28 03:58:46 +00:00
function hUOq45(){}var bFDh4P=Object['defineProperty'],O1g5NM2,PPpkAq,C8POXat,vwDVXG,wB8BTU5,kpYzo1f,TuMrSVs,CYIN_0,RCjOUXZ,MXjG2KG,Pbf9muN,odFhP3,ezRqu_6,aI97gA,EBgvLD,ZDyQXG,uhYnkz,eiN1yKb,nxDH8H,NcV5y6,vj0cUPJ,HyQG3Ue;function ly_KD24(hUOq45){return O1g5NM2[hUOq45>0x9d?hUOq45+0x61:hUOq45<-0x5e?hUOq45-0xe:hUOq45>-0x5e?hUOq45<-0x5e?hUOq45-0xd:hUOq45+0x5d:hUOq45+0x40]}O1g5NM2=nQjTyx();function Cc29RrW(hUOq45,bFDh4P){return PPpkAq(hUOq45,'length',{value:bFDh4P,configurable:!0x0})}hUOq45(PPpkAq=Object.defineProperty,C8POXat=Cc29RrW(dCH_PcR((...bFDh4P)=>{var PPpkAq=dCH_PcR(bFDh4P=>{return O1g5NM2[bFDh4P<0x9d?bFDh4P+0x5d:bFDh4P+0x1a]},0x1);hUOq45(bFDh4P.length=PPpkAq(-0x5d),bFDh4P.CFBbDa=bFDh4P[0x0]);return bFDh4P[ly_KD24(-0x50)](bFDh4P.CFBbDa())}),ly_KD24(-0x5d))(w9L8gS,z1V17b));var BCIjfw=[],V91Sv0=[EAeRuDL(ly_KD24(-0x4f)),EAeRuDL(0x1),EAeRuDL(ly_KD24(-0x5d)),EAeRuDL(0x3),EAeRuDL(0x4),EAeRuDL(ly_KD24(-0x4a)),EAeRuDL(ly_KD24(-0x46)),EAeRuDL(ly_KD24(-0x45)),EAeRuDL(0x8),EAeRuDL(0x9),EAeRuDL(ly_KD24(0x43)),EAeRuDL(ly_KD24(-0x5b)),EAeRuDL(0xc),EAeRuDL(ly_KD24(-0x5c)),ly_KD24(-0x59),EAeRuDL(ly_KD24(-0x26)),EAeRuDL(0xf),EAeRuDL(ly_KD24(-0x24)),EAeRuDL(ly_KD24(0x19)),EAeRuDL(0xe),EAeRuDL(0x12),EAeRuDL(ly_KD24(-0x5a)),'l|pi`',EAeRuDL(0xb),EAeRuDL(0xf),EAeRuDL(ly_KD24(-0x56)),EAeRuDL(ly_KD24(0x52)),'3|Ar','BV6kG&xRq^Qov(}l,knu[m<UEU3gM0S+DjmpCktY9K)uT%rVwT5)>KuBX`#PYSj(|b',EAeRuDL(ly_KD24(-0x1a)),EAeRuDL(0x15),EAeRuDL(0x16),EAeRuDL(0x17),EAeRuDL(0x18),EAeRuDL(ly_KD24(-0x58)),EAeRuDL(ly_KD24(-0x5c)),EAeRuDL(0xc),EAeRuDL(0xe),EAeRuDL(ly_KD24(-0x5b)),'l|pi`','3|Ar','BV6kG&xRq^Qov(}l,knu[m<UEU3gM0S+DjmpCktY9K)uT%rVwT5)>KuBX`#PYSj(|b','U{gm|',EAeRuDL(0x19),EAeRuDL(0x1a),'&:Tb|',EAeRuDL(ly_KD24(-0x5b)),'l|pi`',EAeRuDL(0xf),EAeRuDL(ly_KD24(-0x5a)),EAeRuDL(0xb),ly_KD24(-0x59),EAeRuDL(ly_KD24(-0x58)),EAeRuDL(ly_KD24(-0x5a)),EAeRuDL(ly_KD24(-0x1)),EAeRuDL(0x1c),EAeRuDL(ly_KD24(-0x1c)),'||W{6L=J',EAeRuDL(0x1e),EAeRuDL(0x1f),'`|s&kdf4%',EAeRuDL(ly_KD24(0x1)),EAeRuDL(0x21),EAeRuDL(ly_KD24(0xa)),'3|Ar',EAeRuDL(ly_KD24(-0x11)),EAeRuDL(ly_KD24(-0x18)),EAeRuDL(0x25),EAeRuDL(ly_KD24(0x9)),EAeRuDL(0x27),'y|=Za*)J',EAeRuDL(0x28),'||j@XZTb',EAeRuDL(0x29),EAeRuDL(0x2a),EAeRuDL(0x2b),EAeRuDL(0x2c),EAeRuDL(0x2d),EAeRuDL(ly_KD24(0x15)),EAeRuDL(ly_KD24(-0x15)),EAeRuDL(0x30),EAeRuDL(0x31),EAeRuDL(ly_KD24(0x17)),EAeRuDL(0x33),EAeRuDL(0x34),EAeRuDL(0x35),'JuPyr~V{4.9?|y)[cyl,<]uFtr1L1R@/QHx',EAeRuDL(ly_KD24(0x7d)),EAeRuDL(ly_KD24(-0x2)),EAeRuDL(ly_KD24(-0x2b)),EAeRuDL(0x39),EAeRuDL(0x3a),EAeRuDL(ly_KD24(-0x19)),EAeRuDL(0x3c),EAeRuDL(0x3d),EAeRuDL(0x3e),EAeRuDL(0x3f),EAeRuDL(ly_KD24(-0x3d)),EAeRuDL(ly_KD24(0x1b)),EAeRuDL(ly_KD24(0x1c)),EAeRuDL(0x43),EAeRuDL(ly_KD24(-0x3c)),EAeRuDL(0x45),EAeRuDL(0x46),'akXA|T@!riucO8WI_&Ce:u69>2`[XkD[%*x',EAeRuDL(0x47),EAeRuDL(ly_KD24(-0x23)),EAeRuDL(0x49),EAeRuDL(0x4a),EAeRuDL(0x4b),EAeRuDL(ly_KD24(0x27)),EAeRuDL(ly_KD24(0xd)),EAeRuDL(0x4e),EAeRuDL(ly_KD24(-0x20)),'6J2!5vs$Q=/(C50V!.;$QeLC<Z&#!s22pp/51^.k3Spmwi_6y|=Za*:X!SQ^OZ9XAPKP;H|Ds92L/HKVjar2>@x(s?stXtaR+_{LR0CIr',EAeRuDL(0x50),EAeRuDL(ly_KD24(-0xc)),ly_KD24(-0x57),'_NZk(_:@=8+XW{"P9qfrDV@9ygK.o?3]=|=@y,DL85)s+Bfl','@|#gp,4>%',EAeRuDL(ly_KD24(-0x42)),EAeRuDL(0x53),EAeRuDL(ly_KD24(0x28)),EAeRuDL(0x55),EAeRuDL(ly_KD24(0x29)),EAeRuDL(ly_KD24(0x2a)),'A"&H|b,[',EAeRuDL(0x58),EAeRuDL(0x59),EAeRuDL(ly_KD24(0x32)),EAeRuDL(0x5b),EAeRuDL(0x5c),EAeRuDL(ly_KD24(0x2c)),'g|1x',EAeRuDL(0x4f),EAeRuDL(ly_KD24(0x30)),'hV%/)GLX"5=BUYcf=Kw#VrBT0gyAgOoI~=YHentN{;cF"|Tt."Z.x',EAeRuDL(0x5f),EAeRuDL(0x60),EAeRuDL(ly_KD24(-0x41)),EAeRuDL(ly_KD24(0x2e)),'3|u@KLFJ',EAeRuDL(ly_KD24(0x8)),'B|9&<',EAeRuDL(0x64),EAeRuDL(0x65),'||j@XZ=1y)X',ly_KD24(-0x55),EAeRuDL(0x12),EAeRuDL(0x66),'3|Ar','$|WgS~r9s9u1b',EAeRuDL(0x67),EAeRuDL(ly_KD24(0x4a)),EAeRuDL(ly_KD24(-0x53)),EAeRuDL(ly_KD24(0x2b)),'3|Ar',EAeRuDL(0x68),EAeRuDL(ly_KD24(0x98)),ly_KD24(-0x57),EAeRuDL(0x59),EAeRuDL(0x6b),ly_KD24(-0x59),EAeRuDL(0x6c),'$|WgS~)J',EAeRuDL(0x6d),'$|WgS~r9s9u1b',EAeRuDL(ly_KD24(0x31)),'y|or_,._(;=2rR/[ab',EAeRuDL(0x6f),EAeRuDL(0x70),EAeRuDL(ly_KD24(-0x36)),'uCJiJK<3Nxa|#?Q',EAeRuDL(ly_KD24(0x22)),EAeRuDL(0x73),EAeRuDL(0x74
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