jdpro/jd_dygetbeans_.js

7 lines
193 KiB
JavaScript
Raw Permalink Normal View History

2024-07-18 01:15:17 +00:00
/*
2024-11-23 05:14:25 +00:00
35 0,5 * * * jd_dygetbeans_.js
2024-07-18 01:15:17 +00:00
*/
const $ = new Env('每日抽豆');
2024-11-23 05:14:25 +00:00
function Bcy0UAO(){}var dgCdOf=Object['defineProperty'],MFiyiN3,pXX5B4i,BJN68s3,aoypIX,jGxb6wU,bUnLUV2,KwGhPl,oUeIRWJ,dU_0HSF,TBJs6nY,tHa4kHv,fj5ln3d,CAyH4P,G3215BL,a4Y0E0,EDu7KS,zzVOqkw;function xK8Gm_(Bcy0UAO){return MFiyiN3[Bcy0UAO>0x2fe?Bcy0UAO+0x28:Bcy0UAO<-0x1?Bcy0UAO-0x13:Bcy0UAO>0x2fe?Bcy0UAO-0x50:Bcy0UAO-0x0]}MFiyiN3=g6VSAQp();function S4Yois(Bcy0UAO,dgCdOf){return pXX5B4i(Bcy0UAO,xK8Gm_(0x0),{value:dgCdOf,configurable:xK8Gm_(0xb9)})}Bcy0UAO(pXX5B4i=Object.defineProperty,BJN68s3=S4Yois(lcoJrv0((...dgCdOf)=>{var pXX5B4i=lcoJrv0(dgCdOf=>{return MFiyiN3[dgCdOf<0x2ce?dgCdOf>-0x31?dgCdOf+0x30:dgCdOf-0x22:dgCdOf+0x2a]},0x1);Bcy0UAO(dgCdOf[pXX5B4i(-0x30)]=xK8Gm_(0x2),dgCdOf[xK8Gm_(0x1)]=dgCdOf[pXX5B4i(-0x2d)]);return dgCdOf[pXX5B4i(-0x2c)](dgCdOf[pXX5B4i(-0x2f)]())}),xK8Gm_(0x2))(gJiiaIH,p8w2YYg));var GXDl5Xz=[],RnygCIo=[JEDS8S(xK8Gm_(0x3)),'@b3h|ZI#',JEDS8S(xK8Gm_(0x4)),JEDS8S(xK8Gm_(0x2)),JEDS8S(xK8Gm_(0x43)),JEDS8S(xK8Gm_(0x44)),JEDS8S(xK8Gm_(0x42)),JEDS8S(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
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