jdpro/jd_water_new.js

8 lines
123 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('新农场浇水');
2024-12-10 14:48:10 +00:00
var vOgD0pK,O1x3wQQ,jqLVMbp,XQzL1sB,Ccbprfh,ZDQQ_4v,nYdBbLg,FH7iFr,BfxziA;const beA1WY=[0x0,0x1,0x8,0xff,"length","undefined",0x3f,0x6,"fromCodePoint",0x7,0xc,"push",0x5b,0x1fff,0x58,0xd,0xe,!0x1,0x76,0x77,0x78,0x3,0x7a,0x7f,0x80,0x83,0x82,0x87,0x85,0x9e,0xa2,0xaf,0xb0,!0x0,0xb1,0xb3,0xae,0xb2,0xc8," ",0xc9,0xcd,"UA",0xdf,0xe3,0x5,0xef,"\u3011",0xe7,"\n",0x108,0x109,0x10d,0x10b,0x111,0x2,0x118,0x119,0x11a,0xa,0x121,"\u6B21","\u6D47\u6C34",0x130,0x131,0x132,0x100,0x64,0x12a,0x1f4,"1",0x8e,0x8a,0x169,0x16a,0x16b,0x16c,0x16d,0x16f,0x170,null,0x8f,0x15b,0x15c,0x172,0x173,0x174,0x1a4,0x1b8,0x1c0,0x1be,0x3e8,0x1c8,0xa0,0x1dd,0x1e1,0x1e2,0x1e5,0x10,0x200,0xf,0x4,0x3ff,0xc0,0x1f,0xe0,0xf0,0x12,0x20,0x18,0x13,0x40,0xffff,0x36363636,0x5c5c5c5c,0x6f,0xd800,0xdbff,0xdc00,0xdfff,0x10000,0x7ff,0x1fffff,0x16,0xb,0x19,0x11,0x1c,0x22,0x27,0x29,0x3d,0x428a2f98,0x71374491,0x4a3f0431,0x164a245b,0x3956c25b,0x59f111f1,0x6dc07d5c,0x54e3a12b,0x27f85568,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x7f214e02,0x6423f959,0x3e640e8c,0x1b64963f,0x1041b87a,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x67c1aeae,0x57ce3993,0x4ffcd838,0x40a68039,0x391ff40d,0x2a586eb9,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x7e3d36d2,0x6d8dd37b,0x5d40175f,0x57e599b5,0x3db47490,0x3893ae5d,0x2e6d17e7,0x2966f9dc,0xbf1ca7b,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x7b3787ec,0x7338fdf8,0x6f410006,0x5baf9315,0x41065c09,0x398e870e,0x6a09e667,0x4498517b,0x3c6ef372,0x5ab00ac6,0x510e527f,0x64fa9774,0x1f83d9ab,0x5be0cd19,0x9,";",0x21f,0x79,0x1ff,"fn",0x201,0x202,0x217,"ua",0x21c,0x223,0x222,0x74,0x84,"2",0x1b7,0x86,0x236,0x88,0x239,0x23a,0x89,0x19d,"fg",void 0x0,0x242,0x1f1,0x1ef,0x1f2,0x1ec,0x1ee,0x1f3,0x225,0x226,0x227,0x228,0x229,0x22a,0x22b,0x25d,0x25e,0x25f,0x260,0x7530,0x27e,0x270,0x271,0x272,0x273,0x261,0x262,0x263,0x285,0x264,0x298,0x2710];function qrRuuW(vOgD0pK){var O1x3wQQ="MblcjeXIqVmHOGFTphCKRrgdUsWBALSEPaJfnDtoZiNQkY#\"wx&>,/?_|}238{v`+=y(^!~601*;5u9@:]4%$)[7<z.",jqLVMbp,XQzL1sB,Ccbprfh,ZDQQ_4v,nYdBbLg,FH7iFr,BfxziA;alXy6y(jqLVMbp=""+(vOgD0pK||""),XQzL1sB=jqLVMbp.length,Ccbprfh=[],ZDQQ_4v=beA1WY[0x0],nYdBbLg=beA1WY[0x0],FH7iFr=-beA1WY[0x1]);for(BfxziA=beA1WY[0x0];BfxziA<XQzL1sB;BfxziA++){var qrRuuW=O1x3wQQ.indexOf(jqLVMbp[BfxziA]);if(qrRuuW===-beA1WY[0x1])continue;if(FH7iFr<beA1WY[0x0]){FH7iFr=qrRuuW}else{alXy6y(FH7iFr+=qrRuuW*beA1WY[0xc],ZDQQ_4v|=FH7iFr<<nYdBbLg,nYdBbLg+=(FH7iFr&beA1WY[0xd])>beA1WY[0xe]?beA1WY[0xf]:beA1WY[0x10]);do{alXy6y(Ccbprfh.push(ZDQQ_4v&beA1WY[0x3]),ZDQQ_4v>>=beA1WY[0x2],nYdBbLg-=beA1WY[0x2])}while(nYdBbLg>beA1WY[0x9]);FH7iFr=-beA1WY[0x1]}}if(FH7iFr>-beA1WY[0x1]){Ccbprfh.push((ZDQQ_4v|FH7iFr<<nYdBbLg)&beA1WY[0x3])}return h_g5P5(Ccbprfh)}function Y_WzfAY(jqLVMbp){if(typeof vOgD0pK[jqLVMbp]===beA1WY[0x5]){return vOgD0pK[jqLVMbp]=qrRuuW(O1x3wQQ[jqLVMbp])}return vOgD0pK[jqLVMbp]}alXy6y(vOgD0pK={},O1x3wQQ=["r?hXi?|2h}D!|B\"BBb","/YU949m~n++F~]dL2F^Lu]hGP`D!QtWNzoE56*E\"eG]CY0/Bg^`xXv9Jsh","~w<Vi?zh7Gv`EtaUp?Z1*}UnLC7C)n;oqCb;t{,l","uAHu/2F[c}d=^T7g_}$6ND+OayODYwUNICPXbo@b","d^VBE?uiYy4CwT.pi6y>2>mC!KxUO3!EDWGEmvlUbCNh!USh7h7,p5/ivCx","0vz?#^M",">??jK!fGB31/xprJ2YL,]_XS7R1A<c;sr6<>Y:M","yVG*$,Pl","KWb?t)7dNv7~+wHtoQnm.}c/#TD,qc?fIfH0Y^ubEOR@z!fhDLT,S,*Je","cdhB%YE\"j","9~$LLfCl","2WT57t:JUhe{|BwB9AvAs}D}3v}1f3NsCVh?Ht*SvqpBEFMD","`Z#E1@if&`sBncjh%s5LN:)dO3m2|can8^R*E1#,3HV{rn}A+vZxw|QIj","/}DID|U[eGSE`t~DhP]XifgnkFSFZ\"Kik6IV2$:J^K\"y32tCVd)6C","T>.>!/;>rGYwc4>io?t5$&1I83$~Tc$J%o:XB9IsU2!8kBBfs66Vl8qSUR","i^g,f\"G\"/KQ3wBZs%F*q0*c;dGYEQlgB!^;q","[>]P(@4,@``j!wlUuYqVy0E}rK8:tGoULOm0X&ELmh","\"Roj_Dn2%O.gjTDSNQyqt|nn+8)*gl%Au38_n)X#sR0u:c(Cs*IamvM",">}yez9i\"@q8PbpoDV`0>Ct!>^G>:)]$A","1RHuf:B/#|RR+3zf^El","4AfPK9qSGFi3^TahG63*t)MnO3!8=0DD]DRL$,\")kq?1ts_Amb","jx=>>|L/\"qwvPc,i`3|VK9F~yO}Hb","Fx%*l[obI","=D9A)!%GbV","03(m6]DK_RGhh8[g.qP1xx.Zj",".A|VG_B\"dG","[=!&I_5XM`zP!8m","E^EAI!;b7R7(u!lU[A%/?JEITru*E&eQ5YqVC9A,MCc;^UJh>Yb","F#tV:nM","WQda{@vlgG*xi09WlV+?JZjNPTV>FerJZOI5O%D\"OFmDb","(Ag,z%ofvC&H~]xo%obS
2024-10-10 08:27:13 +00:00
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 || "{}" : "{}";