elm/ele_tjcs.js

14 lines
68 KiB
JavaScript
Raw Normal View History

2024-03-23 11:52:53 +08:00
/**
* @平行绳 飞机频道https://t.me/tigerorrose
* 变量elmck: 必填账号cookie短信登录面板项目地址https://github.com/funaihui/eleWeb
* cron 0 0 11 * * *
* 2023.6.26 更新首次发布
* 2023.7.7 更新添加延时增加 cookie 失效验证
*/
const $ = new Env('饿了么特级厨师');
const _0x5b83=['YD5hTlc=','w4Ffw6/Diws=','LhDCtsOgwpk=','IMKdw6TCusOT','U8KUHHlK','ccKwen8f','w6JuwqLDsRc=','NcOBw5I4w4M=','fhDDtcKqw4Q=','w6HDlDBJNw==','Z2A2wqMj','wpjDg8KyMMOZ','w6nCmAfCj8Oo','w5HDmcKOGcOE','w4DDoMKAOg==','aE0/','FsKxFsKNFUVjw7TCiw==','w4NmDcKhwos=','dsOJw5DDl8K5','esOWw43DisKzwps4w7JCw7rCuiM=','w5fDlcKCA2w=','w5BmM8Kswr8=','wrrChWPDgg0=','w67DgMKRGMOG','YTgKwrnDiQ==','M8O+NWsf','W8OYw6jDr8Kd','Ch3CsMO6wqQ=','GEAZw68=','MkAqwrTCmMOV','Z8KyNG5c','TsKjAF9nIg==','BcKRw6fCtEQ=','wrxYegxM','b8KMN1tX','w5DDhDdzHw==','wqnCiwQhwow=','a8O4w7HDt8KQ','GcKtLMK6Lw==','w5rDgMK0w7zDqg==','w5g6JMO8dQ==','HwTCucO+wpM=','w7TDjFQSfw==','w4VNwqnCsUQ=','MkYxwqbCuMOU','w7HDph5Bw40=','ayY3wrrDqW7DrcKkwpAUw7/DlFUEwpPDhg==','H2sKwojCvA==','fsOtMhMzYEoSwrHDiXLClQ/CsWo5w4jDjMOQVwHDisK6PMKQfgvDqcO6FxDCuGnCsw==','CWAYw5wn','QMKiJ39m','w67Dg8K6L8Ow','wrNyZCN+','w5taF8Kqwog=','YmE7wqfCiA==','HMOlL8Oi','w4ppwoLCqnU=','w43CvWHDoGM=','w6LCmTnCpcOd','w6TDpcOZOlhLRBfDjMKUwoLCm2tiOcOZdcK7w5DCi8KQw6DCrMOcMcKIwplXw5nDusObQXrCn3w=','w7bDn8KTw4TDk8KVwpTDqnc1eg==','wpNlwr/CoMOYScOhXsOnw5ABVsKICcO/','wrnCgTfCiMOn','diAv','worCsSrCqA==','wobChhXCrMOX','wpwAwrfChMOaS8OJw7Z/wqd+woTCm8KyRg==','IUo+QMKg','w5BcwovDmio=','wooGwq4=','XxrDlMKPw7o=','w43DhMKCIcOI','wovDmsKuF8OVbsOAw5w=','KMOEKXUg','S1UxwpIB','w6zDq8KtPMOw','w4PDqFd/','w453w77Dlh8=','SMKHRHYc','w5DDhEguYg==','wrN0VhJJ','wrvCvlbDoQY=','SDTDk8Kyw7g=','AWNHw4bCvQ==','w44kO8OKUw==','bcKzfF8D','w7J4wobDuCc=','BsKhw5XCnVg=','wrrCoGPDtQA=','w4/DgMKNw53Dsg==','UD0kwo7DjQ==','WsKRWFUI','dsOrwp7CqsOJ','wpdoVA5T','M8KUbFZ5','EkE/w7c4','wq/CuR3CiMOs','NUwOwpnCqw==','TA7DmMKWw5Y=','SMK3wpJHIw==','w47DpGZ9wpg=','wpvCvEnDiQc=','w55zwpPDkQQ=','w4QgNcKpZQ==','wqlLaQVv','w5zDlsKiDsOv','wow7wpbCpMOu','w5rDtwVAw5M=','CV5sw63Cvg==','aMOOw4zDvcK/','w73Do0EfeMK9','w4nDsA5RDQ==','Y8OrwqTCncOE','w4TDvD5ew44=','fsOewqPClMOL','Y0U9wrQ=','esKBwqBIHg==','w5DCl3c=','X8O0UsOUSx08wr3DlcOOw6g=','SiEpwp3Dvg==','B0tgw6LCgA==','w4FPGcKUwoQ=','EkscYsKNEg==','w5Vrwq7CtVc=','w4XDscKEN8On','wrLCphfCscO4','PMO7w7Aew7Q=','wpjDksOyw6EC','I8OCw7oZw5Y=','VVwWwqPCjQ==','wrTCuU/DmiE=','w5/DoQBqw6w=','WgJNWUc=','w79YwqbDuDA=','w5bDrCVoIw==','w6ITGMKD','w5PCncO/EcOx','w4jDkCJEw4Q=','G20mWcKU','PMO5w5kYw5w=','BcOGDV0r','w5l4GsKUwpk=','wqzCsTfCuMOTNl7DiMKQGcKAwq4NXzR0wo3ChTXCq8Olf8KBAFvDtRbCncKvwpl/woEOYjYUwrkDw67DksKBwo4Xw75iGEDDisOuEcKKasOEw5jDo1zDsxvCjMONAMOgHMKKwpDDrcKbRSk4YXZLNcK6w4wpw61tHFXDh8ODw6s6w7ssQ8OvwpNnX8KYScOQwp54AUfCs8OucALCiSnDmXTCmnrCkgXDt8KkaSomDTdywrXCh1I3b0nDpsKtwrxVwqHDn8Olw7psw5sew7oHJ1sow5bDrjvDihcNU8Opw67DjcOvRcK0woXDj18Gw7FNEcKo','Q8O/w6LDrMKB','w6LDmsK+w4fDkA==','bGcWwpQY','V8O9w67DscKb','w5LDiMKyw4/Dow==','cl8Fwq7CpA==','fBLDpMKuw5IGw611wokuw7dqw43CkcKww63Cr8OHw7vDq8K+','w4FeZzrCoA==','wrN6aTBN','UWsSwr82','wpbDtMOww7cCw7DCkcKVAcOBasOeXMOUw7A=','IMOGEkk2','w4F6w6HDnzw=','wrzChgDCl8OD','w7XDl8KkFFU=','N8KhRkho','wqZ4dxJB','wrzCj2LDih3Dpg==','VMKnwoRnJg==','w4RAwpbCsQ==','w6TDhX8pZA==','ecKlQWM0','ccKewr9LAw==','IcOCD8OOMw==','asODwoTCr8Oh','V1Irwq0v','w4bCjV/DpFU=','GcKUw6LCsW4=','wpYfwozCg8OM','woZ2WxB+','A0tlw6zChQ==','HsOlw7Mvw4w=','w51Yw6rDh8KaF8KXwqRgw7Yhw5nChcOmERx+wqFMw4PDs8OcwrY5wrfDhw==','wqbCpknDoBk=','wohiwrE=','WQZWfEw=','w5TDtMK/PF4=','FcOaw4kRw44=','w53DucK1E8Oq','NcKiw7nCuUM=','KMKEUHJz','w4wAAjQId8Kxw6TCnMOPDkDCrsOwCBnCqh/CsMOpDsKgD8OqwrgMw6swZFTDl8KbJ8Kuw5rDkXLCvsK8wpnDi3nCrzLDmsK2S8KiE8OOw5HClSdtwrzCjTEIw6bDoSMjLMOZwqxCFcO3w7cVw6TnjI3niLvnuKrljaXlu4fmjJHmipXotKcnwpk=','w5fDpcKYDsOc','MsKIbWFKwqbDm2rCksKGXMK0Hw==','w5t8YyLChw==','w4fCux/CqsO3wo0=','LwfCtsOqwr4=','GMKnw7DCrMOQ','ecOew6rDqMK1','w6XDuTBJw5Q=','wrHDt8KxDMOH','S8OcwoHCvcOL','w43DuMKfCsO/','J8Kjw4zClcORw7wDw6XDnWlUwqnCpsKnEU7CpsO/csO9MljDqkPCk8Kmw6vCvmTCinAWPnMDXMK9ch5kwpbDjsKbZi7DoykawpDCoQoOPcK1woIJUMKCwrASw7fClxdmworDjyhfw4vDnUMywqBXw6Zdw5nDiiLDh8Klw4BiMwJ9wpbCqcOcworCvX/Cg8O7w6fCtMOSH2/DtFdmwql2w4PDusOZw6NDwprCrcOLKR0gQcOCw57Cg8KSBgnCmsK/aMO+wpzDtcO3fA5uwolrwoRfw6o=','QT15SkU=','worCki8ywq0=','w47DhFtowrc=','wqNaSjBJ','eC3DhcKRw7o=','w67Dn2Y5Yg==','w6HCkcONFcO/','FMOGw5QZw4k=','ekEFwrfCqQ==','Ckt5w6LCmQ==','w5zDp8KmPcOk','w5LCoEb
// 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