mirror of https://github.com/KingRan/KR.git
18 lines
56 KiB
JavaScript
18 lines
56 KiB
JavaScript
|
/*
|
|||
|
|
|||
|
脚本默认会帮我助力开工位,介意请添加变量HELP_JOYPARK,false为不助力
|
|||
|
export HELP_JOYPARK=""
|
|||
|
|
|||
|
运行频繁会403,请自行定时运行
|
|||
|
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#特价版-牛牛乐园助力
|
|||
|
1 1 1 1 * jd_tj_nnly_help.js, tag=特价版-牛牛乐园助力, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
const $ = new Env('特价版-牛牛乐园助力');
|
|||
|
var version_='jsjiami.com.v7';const iilII1=iii1II;function Iii11l(){const i1Iili=(function(){return[version_,'bKjIfsjpKGiWaImip.cSoFHmD.drvy7upAwTLUqA==','t8kjW4y','W4pcO8k8W4m','W5pcPCk9fos6UUwiMUwlUUIIG8kaWR0LWR/cPSoVgYhdLSoX','uZJdNmoAzt0','WQhdUSk1WPmI','WRL5rG','W6pdLSkTWOldIhBdOtlcUW','WQPdW5NdStBdHgSUWRKRqJu','W68jBSkQ','fbG/WOj7','WP4zW6KbWPu','WQddUmkvz20','vtJdGCovxJKQAbG','vmkhW4Gl','WO3dMmk0swldHW','udTrWPO','BK0rWPqqiG','W5OQW4xdLmkwrJKhWRtdPmkGyIDusxe','5lQ65lIT6lsZ5yYf','Dga9WQia','vYNcPa','j3tcQmovW7K','fSkTttSe','fw/cGCkhoIiWqXqWWOm','W6VcRf8X','smkdfG','CEISJUMeQUAwGoEyLow+SoImH+wpUJNcSCo5CCkHahJdS8oTW7vOx8klW7yfWPfhagddUdT8wLlcTSoMt8o1W67cO3WPW5CHWRtdP8kYcSoVmXddPmkZDa','CH8iW6C','v8khW5iuWRfLW7CqW54','WO7dJ8kCWOKC','FSk6irtdHNmzD8kk','wWhdQSovuG','x8kKxmknWPi','trPGxq','W5VcS8kJW5VdKmkvW4GmW40','AXusW6Gv','W4FcT8k8W4ddL8kiW50uW40','WRtdSCk2DWZdSmkCWQxdTCkph8kpWRxcQLyVWOhdV8kzW4lcQ8k+','fmoHzSoH','WRTDDCoHW5G','eSkkWQTFcmkmW54','W5pcGbu','WRtdVCo5Bc4','vSknhW9ZW7y','WPDJaGRcQxm','WOJdLSoHcSkc','fh/cLmotW6ddKc7dM33cJ8kXuY8sW5BcOSoJWPBdQLnvW47cVSkKi8oFWOpcPSoDWPBcJ8kUhqz/W4ZdQqSOxSo1WOFcRW','l8kiFSo4qG','DcRdL8omrdeZyq','WRVdRCo1Ftm','5PAe5O+h5B+T5BU9CUwkIowjI+wLToI3Ho+9MHVdOa','WQRdSSobzHa','WPldTCkosG','q8osW4NdLG','WQqSW6eUWPW','WPhcMNfI','WR/dR8ocdCkUW740WRSNWOO6W5e','rtysW7nD','W4/cGKeJsG','W7VdN8oFW7PRWQe','tdlcPmotW6K','uSoOnJVdHq','WOddSCoJxW/dMSkaWO4','WP7dVCoufmkPW6S8WRm','WQjoiXBcHa','W6xdJCo4W6e','h1jwW4jVmSoYWPO','W4PiCsbVWOe2WP3cT1JcGaZcMW7cRZxcKLpdM8kCWR/dUIbJt2xdTmkYWQJcUGzmA2e','vs9Js8kQ','b8kpumowACkz','W4ipW6NdHSkX','dmkz5yIN5yIn56cmWRKs','sWW2W7qa','W6ddUSo2W6n6','fXSLWOe','5lUy5yUA5As86lsD77+4','WQbRuSo6W6ZdPSklWO4LfCkE','FHebW7S','emkbtmowrmktWRDKnqpcLq','hSkPWOLJbG','W6PWzmkeWQm','qcNdM8kqz340yfmxWR7dOW','6kYR5yQ16zIJ5Owj5z+Kz8k0A2Si6l+R5yAU5QcR5lYQ5Pw+5ywi5A+Ku+w6UUIUNEMaOEI+RUIfREACGowpMoInHEwpQdZdSIG/D8oO','vXP+u8kTDhRdV8kF','W7WEW5tdKSkl','W6xcO8oDiCoJjW','WO8PW4tdK8kw','W48PW5xdM8kNwxLt','W6VcRf8Xhmk/WOxdSfZcN2hcUqOvFaTtgSomyaBdLwFdHCkLWQ3cH0DlsCkgW4JdJSohj14tWPj5asxdUN/dRSoxWOyikSopW68sWRldLSk9WPKXhSkSW6JcPKBcIX3cTqVcOa','EL5Y','WQzWgJBcIa','W5HrqGL7','BK0r','WPxdUSkvrSkpW5OoWODXxg/cPGCoW7/cUSk2','ACosW4xdI8oY','W7VdGSo1W7b3','WRNORkhPHilMLjVNM7JLVRtOJj7LJQ7dI8kHlWVcGI0','WPTbvSo0W6K','WPxdU8kq','zSk0psrU','W77dG8o2','uYpcR8oaW4HWtaaN','A8kNvmk8WRy','FmkWncBdThqDsSkbDCkw','WQ/dNSo2W63dOa','W4aQsmkBWRW','e8kbvSoj','mh/dVtC','WPFdN8kit2JdHCkjpvu','W7jVx8kRWQpdJmoKbSo7zh7dPmovW5tdO1hdIvWiWRldOSou','b1C3ca','nurxWRehACoYW6RcIx18aCkP','WO/dQmoWwcJdMmkmWP/dICkHp8oXWQZcTKXRWPZdOCkXW5JcTCkssJLAW4vwW73cIJJdIdJcHa','WRhcVZ7dUSkx','WQBdISkvFgS','WOddImkCWQ4EsmkJmq','WQfbhZVcIa','iJysWRnzlazsFSk+WRtdPhH4sSoDE8oGbSonfLnJW5DsemoaW4XRWPKlW7veF2arrhBcKmoLA8onW74','WQnwW5ZcRWJcNMa+W7i','msGEWRDUwHaPCCkQWORdHMPh','WPtdISkivwm','ySovhXGspCo5rqSbAq','gKSJ','bXSIWOTPzJ8p','WO4EAtLYW5bqW5BdTbldI27cHxhcIYNdSaFdNCkMW5tdTrrFwt3dO8oAWQxdTdnKyY0Q','tXrQ','WRRdQmoHDXi','vqjEWOr/','Cd0VW5T/','WOddISkorW','W6NcOSkteSkgW7K6WP8pW4fZ','CCkFfbLsW7RcJmo0','WOZcI0PUhG','FJ5/WPrh','Aqqd','scRdVSorBtKW','jmoIjmoSW4/cU23dHvRcTW','W6pdLSkTWOldMhRdOt/cTXNcPCkrWPNdTW','W43cIYjsWRS','v3KunEIVOEAYRowNP+I3ME+9RoIVSUAGUUACG+E8HUI0KoMeG+ISHW','WO0jgq','vqmWW6Lf','arJdOSo36k+95Rcs5AwV6lsH772X6k6d5Qcr5P2R572z6lEV6yE36k+1','FCoTbYG','WR/dR8ocdCkJW68LWRCcWO8fW4XlWOq','puBdJcGD','WRX6W4lcUdW','zW3dRmkqWRJdRL3dRbBcNCkG','nLrpWQHqWOjk','zSkWpHa','WRhdM8oPW4RdSW','dmkfu8onu8kiWOj5pq','ySk+pG/dMw4lDW','hmkCWPnudSkrW5e','WQn+rSoYW5O','ECkPz8kY','W5ORW5ldMCkfsx1FW6pcPmolj30cbs7dP0pcGW','yanbWOPn','aSoVCCoZW7ZcGKjKW6WMlYy','fCkCWPbzaCktW5LyvSkjW6rRWOusmCk3WO7dVN5k','WQbRuSo6W6hdVCk6WOOegCkEsq','emkbtmowtmkvWO5KldlcJ8owWOVcSW','lmo5E8onW50','oLhcVa','W4G9W4xdK8kwu3O','m3HsW4TT','ECokW6VdPepdOL/cVG','kx/dUsy','W7VdO8kpWQxdSG','nsJdI3BdMsvcW6W','DWmwW6PFn8kSW4lcHG','rJvgWOHRW6u2W5bmFmkE','EfH2WPNdNSkwk34','beW2fxJcICk/WPOz','WQFdOCow','edVdQL3dNW','ESkWkG','WQxdRSkxs8kV','Emo4W6pdMmow','W4DsCW','WPvJhH3cOW','WQDCW5FcMINcMa','nSk5ECokta','fgGcnwq','WQldHCodnCkO','F0FdOCkcWQm','WOfJga8','A8kMEa'].concat((function(){return['WRHLrG','DcpdU
|
|||
|
// prettier-ignore
|
|||
|
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
|