jdpro/jd_water_new.js

8 lines
129 KiB
JavaScript
Raw Normal View History

2024-10-10 08:27:13 +00:00
/*
15 1 29 2 * jd_water_new.js
*/
const $ = new Env('新农场浇水');
function hStGgy0(){}var mYgFjr=Object['defineProperty'],GyjcbGY,Uw7ELQ,JSur6W,JSvTRg,pKDSDh,PUNnWg,sHXdswE,vNLoedO,dxrDTb,BQCAGs,LLBKKFv,lMoDyDD,f6cHjwq,JpRaHlR,ESpf66i,cHEqxA6,dZxyKzo,LjNYcw,zZtQvOK,rdeJMf,OfbYkO,DYy9GW9;function FbGGfA(hStGgy0){return GyjcbGY[hStGgy0>0x195?hStGgy0-0x3c:hStGgy0<0x27?hStGgy0-0x58:hStGgy0>0x195?hStGgy0+0x33:hStGgy0<0x27?hStGgy0-0x43:hStGgy0-0x28]}GyjcbGY=Gd6Ak8y();function Gvc_dnf(hStGgy0,mYgFjr){Uw7ELQ(hStGgy0,FbGGfA(0x82),{value:mYgFjr,configurable:FbGGfA(0x99)});return hStGgy0}hStGgy0(Uw7ELQ=Object.defineProperty,JSur6W=Gvc_dnf(GZAe5_((...mYgFjr)=>{var Uw7ELQ=GZAe5_(mYgFjr=>{return GyjcbGY[mYgFjr>0x158?mYgFjr-0x22:mYgFjr>0x158?mYgFjr-0x3e:mYgFjr<0x158?mYgFjr+0x15:mYgFjr-0x25]},0x1);hStGgy0(mYgFjr.length=0x2,mYgFjr[FbGGfA(0x28)]=mYgFjr[0x0]);return mYgFjr[0x1](mYgFjr[Uw7ELQ(-0x15)]())}),FbGGfA(0x6d))(NfHqMOq,ZS3ENoV));var buyJaZi=[],RbEShC=['|o6_T5);9',JNf8hD(FbGGfA(0x6f)),JNf8hD(FbGGfA(0x7c)),JNf8hD(0x2),JNf8hD(0x3),JNf8hD(FbGGfA(0x3e)),JNf8hD(FbGGfA(0x6a)),JNf8hD(FbGGfA(0x75)),JNf8hD(0x7),JNf8hD(FbGGfA(0x7a)),JNf8hD(FbGGfA(0xa6)),JNf8hD(0xa),JN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D(0x3f),JNf8hD(0x4),JNf8hD(0x40),JNf8hD(FbGGfA(0xb0)),JNf8hD(FbGGfA(0x29)),JNf8hD(FbGGfA(0x5d)),JNf8hD(0x44),JNf8hD(0x45),JNf8hD(0x46),JNf8hD(FbGGfA(0x2d)),';A|(]K#5',JNf8hD(FbGGfA(0xb8)),JNf8hD(FbGGfA(0x71)),JNf8hD(FbGGfA(0x5a)),JNf8hD(0x36),JNf8hD(0x37),JNf8hD(0x4b),JNf8hD(0x4c),JNf8hD(0x4d),JNf8hD(FbGGfA(0xbb)),JNf8hD(0x4f),JNf8hD(0x50),JNf8hD(0x51),JNf8hD(0x52),JNf8hD(0x53),JNf8hD(FbGGfA(0x6e)),JNf8hD(0x55),JNf8hD(0x56),JNf8hD(FbGGfA(0xc5)),JNf8hD(FbGGfA(0x90)),JNf8hD(0x59),JNf8hD(0x5a),JNf8hD(0x3a),JNf8hD(0x37),JNf8hD(0x5b),JNf8hD(FbGGfA(0xc7)),JNf8hD(0x5d),JNf8hD(0x5e),JNf8hD(0x5f),JNf8hD(0x60),JNf8hD(FbGGfA(0x29)),JNf8hD(0x44),JNf8hD(0x61),JNf8hD(0x62),JNf8hD(0x63),'/9B]Ta|5',JNf8hD(0x64),JNf8hD(FbGGfA(0x2b)),JNf8hD(FbGGfA(0x189)),JNf8hD(FbGGfA(0x2c)),JNf8hD(FbGGfA(0x38)),JNf8hD(0x69),JNf8hD(0x6a),JNf8hD(0x6b),JNf8hD(0x39),JNf8hD(FbGGfA(0x3d)),JNf8hD(0x37),JNf8hD(FbGGfA(0x4d)),JNf8hD(0x6c),JNf8hD(0x6d),JNf8hD(0x6e),JNf8hD(FbGGfA(0x59)),JNf8hD(0x70),JNf8hD(FbGGfA(0x2a)),JNf8hD(0x71),JNf8hD(FbGGfA(0x2a)),JNf8hD(FbGGfA(0x3f)),JNf8hD(0x3a),JNf8hD(FbGGfA(0x42)),JNf8hD(FbGGfA(0xa7)),JNf8hD(FbGGfA(0xc8)),JNf8hD(0x63),JNf8hD(FbGGfA(0xd6)),JNf8hD(FbGGfA(0x2a)),JNf8hD(FbGGfA(0x2b)),JNf8hD(0x76),JNf8hD(0x65),FbGGfA(0x39),JNf8hD(FbGGfA(0x9f)),JNf8hD(FbGGfA(0x9d)),JNf8hD(0x3a),JNf8hD(FbGGfA(0xd8)),'[CJ+XK|jh^QJ^C(iJi^dU&0$',JNf8hD(FbGGfA(0x2e)),JNf8hD(FbGGfA(0x2c)),JNf8hD(FbGGfA(0x9c)),JNf8hD(0x7c),JNf8hD(0x7d),JNf8hD(0x7e),'Ji^dU&~]HSQJT`>QnVl"v8f@Rh5Q7McHFJ2jkl$|=pcD+?`{Zs5e!@&CZD%b5',JNf8hD(FbGGfA(0x2a)),JNf8hD(FbGGfA(0xd9)),JNf8hD(FbGGfA(0xe2)),JNf8hD(0x81),JNf8hD(0x82),JNf8hD(FbGGfA(0x2d)),';A|(]K#5',JNf8hD(FbGGfA(0x62)),JNf8hD(0x7a),JNf8hD(FbGGfA(0x2c)),JNf8hD(0x84),JNf8hD(FbGGfA(0x83)),JNf8hD(0x7e),JNf8hD(FbGGfA(0xdb)),JNf8hD(0x87),JNf8hD(FbGGfA(0xe0)),JNf8hD(FbGGfA(0x3c)),JNf8hD(FbGGfA(0x41)),JNf8hD(FbGGfA(0x2e)),JNf8hD(FbGGfA(0xcc)),JNf8hD(FbGGfA(0x
function Env(o, e) { class s { constructor(e) { this.env = e } send(e, t = "GET") { e = "string" == typeof e ? { url: e } : e; let s = this.get; return "POST" === t && (s = this.post), new Promise((i, r) => { s.call(this, e, (e, t, s) => { e ? r(e) : i(t) }) }) } get(e) { return this.send.call(this.env, e) } post(e) { return this.send.call(this.env, e, "POST") } } return new class { constructor(e, t) { 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 = e, 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, t), 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(e, t = null) { try { return JSON.parse(e) } catch { return t } } toStr(e, t = null, ...s) { try { return JSON.stringify(e, ...s) } catch { return t } } getjson(e, t) { let s = t; if (this.getdata(e)) try { s = JSON.parse(this.getdata(e)) } catch { } return s } setjson(e, t) { try { return this.setdata(JSON.stringify(e), t) } catch { return !1 } } getScript(e) { return new Promise(i => { this.get({ url: e }, (e, t, s) => i(s)) }) } runScript(a, o) { return new Promise(i => { let e = this.getdata("@chavy_boxjs_userCfgs.httpapi"); e = e && e.replace(/\n/g, "").trim(); var t = (t = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +t : 20, [s, r] = (t = o && o.timeout ? o.timeout : t, e.split("@")); this.post({ url: `http://${r}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: t }, headers: { "X-Key": s, Accept: "*/*" }, timeout: t }, (e, t, s) => i(s)) }).catch(e => this.logErr(e)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var e = this.path.resolve(this.dataFile), t = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(e), i = !s && this.fs.existsSync(t); if (!s && !i) return {}; i = s ? e : t; try { return JSON.parse(this.fs.readFileSync(i)) } catch (e) { return {} } } writedata() { var e, t, s, i, r; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), e = this.path.resolve(this.dataFile), t = this.path.resolve(process.cwd(), this.dataFile), i = !(s = this.fs.existsSync(e)) && this.fs.existsSync(t), r = JSON.stringify(this.data), !s && i ? this.fs.writeFileSync(t, r) : this.fs.writeFileSync(e, r)) } lodash_get(e, t, s) { let i = e; for (const e of t.replace(/\[(\d+)\]/g, ".$1").split(".")) if (i = Object(i)[e], void 0 === i) return s; return i } lodash_set(e, i, t) { return Object(e) === e && ((i = Array.isArray(i) ? i : i.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((e, t, s) => Object(e[t]) === e[t] ? e[t] : e[t] = Math.abs(i[s + 1]) >> 0 == +i[s + 1] ? [] : {}, e)[i[i.length - 1]] = t), e } getdata(e) { let t = this.getval(e); if (/^@/.test(e)) { var [, s, i] = /^@(.*?)\.(.*?)$/.exec(e), s = s ? this.getval(s) : ""; if (s) try { const e = JSON.parse(s); t = e ? this.lodash_get(e, i, "") : t } catch (e) { t = "" } } return t } setdata(e, t) { let s = !1; if (/^@/.test(t)) { var [, i, r] = /^@(.*?)\.(.*?)$/.exec(t), a = this.getval(i), a = i ? "null" === a ? null : a || "{}" : "{}";