jdpro/jd_joypark_task.js

7 lines
70 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
38 8,13 * * * jd_joypark_task.js
updatetime:2023/9/24
*/
const $ = new Env('汪汪庄园任务');
var version_='jsjiami.com.v7';const _0x5e12d4=_0x381e;function _0x2688(){const _0x3a1af7=(function(){return[...[version_,'wbjelnsLNjiAaqlmIi.xcobmC.TSYvL7MSkKWNtw==','q8klWR8','C8o7ad3dNG','F8oPWQpcJmkvrmkwW7qp','W4PxWOpdNmoc','W7fWWQ7dOmor','tW/cGSosjSoGW7y5hmkUW70','gmooWQiVWRG','W4u9dKu3','WP/cK8k4b2VcOSoLWR4','W4S5W6zPia','W4X/xSk2WRmuogKiW6pcRHdcOcK','rNTyBdPd','qspcHa','emkNcXVdG8oTWRhcKW/dINSnuHr1x8k5','k2JdJW','ph/cUCo2mLqKW6tdPCopgYy','W4uXW7ZcSSo7','yKuv','W64phwSY','temgWOm','fSoVo1SMoSoqf8kFCI/cHSkzwq','zZyEWOFdQa','WR40aCkqtq','W4K9xSkGhY7dNmkw','WRu+k8kr','hKe6W7FdGCogW7K5','WQiph8kzxG','A2GFW5JcQq','WQzYW6ldTCkxfmkulqBdIIxdVSk1wx/dKZnTW6PeavxdVq','W4SOW57cVmolW60FWPJdGG','W6OhahCf','qW0OWO/dOG','WPTRW5pdNmkt','BqOPWOFdOa','W6CKC3xOR5lMSz3LP4lOTjBVVydOR5BMOiJMN5VNV4BOTQdPHzlORiq','WPhdPWldPCo+W7NdQSoexW','W74ZqSkGpZ/dS8k/WPddGSk/W5e','amo3WPy4WQ0','u8kzWQVdLCkzxYNdRa','hmkkENLW','W5yNW4NcSSoN','jxFcICkqW58','wWy6WQ/dSG','WO4samkVt8o1igRdUa','s3Cruga','WOX/b8ooW7W','umoPaaS','W5ZcImo3BW','W74ZqSkGiJldPSk3','WQimW7VdICoJWQWn','rtpdPXmz','yhK+WRihe2NdQ2/dQmooWQK+W48lWOpdV8kUWQy','WQuyW6VdGCokWRytWO4ZWPZcMCkpfNu','WONdQry','WQ9koCocW5y','W7ddSWxcKSkm','iowoPEwkN+wkKg4','v3xcGSkJWR4','FHVdLJKAWRuLWPu','WQddIsBdPSoc','W6HpWQdcMmkWW6LgWRyjWOBcVmkqga','kw7cUSoXaG','WPZdObhcGUISV+AWREwLR+I2R++/TEITGoAHJUAFKEE9I+I2JEMhToISMW','WONdTrBdM8o7','W48OW5/cPmo6','WO40a8kvva','WQuUqa','vmknWRVdNCkOvsO','t8oNWOxcTCkk','W4u5W4rFcW','BmklWRDoW7/cTxXZ','sUMIG+wmUowMP+wiIa','WP8gm8kRFCoYkNFdUq','awT1W74U','zbpdHJKaWR08WPZdUa','WPhdPWldPCoUW7/dISobv8kKfq','W61gWPBdUSobWOjqECkb','WOnxW6ZdN8kJ','guxcQa','Bq7dR8kiWOy','W7Sfwmkpla','CCo3zHzZW5LlaxxdQ8kY','W7PKrSkRWQS','WO7dNdddTSoR','w1CrWOhdQmoZpW','fKtcUaJcIG','egzZW6u','F8k+WQddNgO','W4ZcLuq+ls9+esa','zM/cRSkDWPC','W53cGmoLr2G','W5vOWRFdICoM','xx9FFW','WQqnW5fh6k6g5Ro+5Asc6lwc772R6kYw5QkA5P+6576g6lE96yAc6k+y','6kY05yMR6zIE5OAj5z6fkCk3W77cS8oI6l2F5ysF5QcA5lYr5Ps85yE85A22vow7SEIUG+MaGUI/PUIeVUADH+wmS+IpJ+woJ8oJoXVdJZ4S','yYeRWQpdVmk3ew0iahdcKmkCWOOCW5isjK8','h2VcGX7cQq','WR8yW7xdJW','WQilvq','WQWIvg9T','CG7dJSkBWQDMbha','W7JdMhNcSmoW','W6bXW58Rxa','oL3cL8k8W4O','W60wW6T0pa','WOxcK8kMcq','yeSFW54','W4PzWQegFW','d8k/quTSWQRcMZi','t8oBtsfy','WRFdTCoIW63dUrlcQmoJ','b8oXhfOX','ydSsWOldRW','rhHVtIu','WPS9W4FdRSodWP0RWQa','D8ohFhXc','W5mLEmkAjq','W5xdRrJcOSkz','CmofEgLp','WPxdPWpdVCop','W5BcImoUAW','A8oIjsNdQq','WOH+nSoQW5S','uNG5WRddOq','f8kTvxvP','qSkrWObwW7W','gSoeWROpWOy','b3BcIq','hK8AW6JdP8ogW6mYWPG','W7fYe8k/fZJdVCkgWQxdM8kPWOD7W7NcRq','v8o7BHD8','W6qKivizDa','oCoCba','coMIPowoPowMTowiVa','hMtcNCkAW619WOTZ','WO8yhW','qXCvWOtdMG','WOtdTGhdOSodW7pdV8oCu8kUcmkAWQ3dVghdOsrQsCkJo8o5A8oXzYJcTLddM8oNW4VcPmoR','w1yaWOVdO8oNjr4n','wZCmWP3dGa','6k6c5yUv6zMa5Owx5z+XWOi2cmoQW57OVOdLHy/MOzRKV5xMLO3LH4ZLR5f55BM76kYL6you6l2n6iA85PYE5y2/6i+B5y+JbLxdTGhcPSon','W5pcJLe','AJyRWRRdUCoKsISma0BdJSkDW4ucW5btn01zmq','W6S2a04y','n+s5T+wjRUwNJEI3O++8Sq','W7qTW7n9fa','WQmktvK','hKpdJqBdJq','W6pdOvZcPmomnG','WR5NW6tdTSkb','FSoIWRNcLCkYvCkNW6Ke','tcFcOttcSG','h0xcTHRcUmkZpdNdJSolFa','W44KW6HjhW','E0abWOKD','jCoCWR0pWQ4','rKe8','q3ff','WRxORjBPH7VML6FNMlJLVj3OJQdLJQftyCkwWQD5W4C/tKK1W7uVWQ3cJxRcPG5rW4BdQmkXWQ3dIX8iW7ZcRqvLWRFcHe4LB8obWPbFWOTIyColomkPza','r07cL8kuWPC','WOVdRXldPCoKW7hdS8on','ESo/WQG','bMeVW67dSG','WRm7W5pdK8oL','W74Na1qj','B3WtWP4A','sue0AKDc','wxFcPG','mKBcJCoudW','W5LUACkYWQSCjMS','tf0FW7hcIq','imoCb2CHfSo7omkY','rG3dV8kiWPPSlxdcHCkiW4VcTa','rCkQgq/dNSoLWPhcGXddGxztcq','WQjPW7e','lCo8WQWvWPS','iCoCWRWxWO/cGmoUyCoSwCoX','w3NcRmkO','W5rzWPao','WRzhW7xdRmk0','FSkWWRpdUNdcVq','m0tdUG3dNG','B216rdS','caj5Du9ucCkjqNv7','W61gWPBdUSozWOjxyq','W5pcGbiYdG','tSkwWQ7dL8k5qWNdOmoe','WOpdRX/dR8ogW7ZdPW','WOzFm8oMW5ZdH8oQ','hMRcVCkfW4TTWPvX','W5TUW7WsASoxW4NdVG0','WQeyW6RdMCoJ','bMRcIq','g0ZcLH3cSG','WOtdTJxdOCo+W7hdRCod','W6CHvG','mfhcUmkJW40','uti5WOFdNq','p39IW6RKUBhLIB/LIBlOOAXnfKhcHmoqW4TvWOLa','wsRcKrtcLW','W5vLW74FF8ogW7G','W7iiuSkEbq','n3zOW7lcV8oSvwuGof3cPSkZ','WONdMmk7nZKDd8kmamoSgmkuWQm','W4TQx8k0WPeApgyf','WRddVYNdN8oV','WRKUvmoS','WQddLYJdICot','sXBcQcbUgq','WOn1W7VdLSkx','W54QW5NcVSoPW60FWP3dGSo
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); 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((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } 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.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.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) 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(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d