mirror of https://github.com/BIGOSTK/elm
20 lines
121 KiB
JavaScript
20 lines
121 KiB
JavaScript
|
/**
|
|||
|
* @平行绳 飞机频道:https://t.me/tigerorrose
|
|||
|
* 变量:elmck: 必填,账号cookie,短信登录面板项目地址:https://github.com/funaihui/eleWeb
|
|||
|
* 定时随意,每天跑一遍就可以
|
|||
|
* cron: 7 7 * * *
|
|||
|
* 2023.5.8 更新:连连看,欢乐倒水,饿了个饿
|
|||
|
* 2030.6.15 更新:领取 20 体力
|
|||
|
* 2030.6.16 更新:更换查看乐园币接口;修改环境变量为 elmck
|
|||
|
* 2030.7.7 更新:增加延时
|
|||
|
* 2030.8.22 更新:增加免费抽奖
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('饿了么乐园币');
|
|||
|
|
|||
|
const _0x106e=['w6jDnDECEg==','w6/CmwREw5Q=','wqp3eMKoDsOuTgVHNw==','X8OzdDHCoQ==','eTZtVcOBw5HCuMKOwpUH','wqtgwpNmwoM=','wrHDm37DsMKC','e8KEH14aw73DncKgw6Qr','wrNbwqDDlcKbOSvDhsOqwrc=','XMOPQwbCgg==','M8Kiwo0+DQ==','e3ZHfMOF','WnZCQMOX','f8ONw77CpcOpw5vCtXEUYQ==','S8KGGEUBwpZYU8OKMA==','QhgiwoNF','MGXDmFZt','w4fDgRI=','O8OXw6g=','w5nDt2VJwpVBM8OXOsK+','I8KXw4lfOsKmXMKIJMOm','w6otUw9H','ccKGwrHDiMOdwqMEw5Rvw7g=','C3PDiMO+RQ==','w7o/woFIIjZjTcKMaQ==','w7jDrAHDjHo=','w7fDqcK2DSo=','w5zDomVcwpQSfcKUHsKk','b8KLw5lEJQ==','w47Ctxt7w6Y=','wpsGbScwLsOTwql+wro=','w7ZewrJB','ZMK7wrTDssOl','wpDCkUdLw6liT8ODwpsA','Hj7DkzTCrg==','w4rDihFBwqVgS8OKwrIm','fsKuwqbDocO0','w6bDszo6Kg==','wpXDvkzDrcK9','Ul0hwqUWVsKHI2jCnw==','F8OxHlLCkA==','w6p/wptzwoHCrMO/wp4vwrE=','w5rDr8OTRio=','AH9Ow5FTKFYdw4Io','CcKGwpED','w4kTTsKuwrLCtjvDmMKKwrg=','wofDg8O1bMKFwrvCsGnCoFc=','w4jDrBjDm1c=','w5vDqwN7w6zCvMOEJ8OGw7M=','wphqwpTDvMKL','wqlwZsKXBMOzQjVA','FMKzdsKEeg==','w4LDv8KtKyI=','VMKow6B2wpPCv8OtEwwC','wp/DkMKKwpTDsA==','w6MfB8O8HA==','wqzDpcOCbcK+','B2l0w65P','562M5Yi25oi05Yq6','wrJMw6gmKA==','BcOhGUjCug==','TsOTwrd/w60=','w5vDmiIpFA==','csK6woTDlMOE','wo4Xe8OnDQ==','wo8xwopudw==','w4cjQRt2','wrfDksOxw48a','SgYZwqln','wrzCk2HCnQMNE8OvDlg=','XhkewohP','w4YMdAlw','w6HCpQjCrcKM','w43ChSF+w6A=','wpfDnMODw6w7','NUTDrXpg','wqIyd8OpPQ==','N8OmN0zCtg==','A8KMwphPP8KpUcKrPMKe','w4MSUz5y','IG1Vw5xkNH5Bwr8n','GMKYUcKx','w4trwp7CtiY=','wqt0w44COA==','w4NIMMKqQlRjwqfCvg==','w6vDqsOwYho=','w6ZywojDs8OEGWzDgcOmwrs=','a3JXRsOTw6zDmMKqwpIr','ZsK3w7J/LMOzwrYdS8O0','w7DDqVsgw7IwG8O7w54L','w7rDjMO5Ujo=','wqfDm8Kqwo/Dow==','w5dRwq/CoRw=','EcO2w6Y5wqTClcKLw7cwUg==','w4vDvsORWTY=','XMKWwqzDk8OX','w7UkQjx2','w4HDjQwqwq5xRsOBwpo=','wpgNwqFBQA==','w5IsSixP','wr9KwqTDnMKAMyvDnsOKwrY=','wqzDpcO2wqNNwrfDpkg4JQ==','wpnDqMORTcKb','DcOOw6PCmsON','TMKnSWcxw4JdF8OuBA==','aMOWw63CuMOQw58=','W8Oowrh7w54=','wo/DnsKDwpXDlw==','bcKgNW0/','wrpsdcK3Ow==','w4vDkAIXwrg/AcKBwoor','w6fDgcO7YDo=','HHDDocKvOXnDi8O5TsKQ','w7DClyjCp8KuwpvCjw==','WHdKYcOX','w5nDt2VJwpVBM8OXI8Ko','wrzDijLCssOUXhzCgcKhw4Q=','Khw3wqEow6NIwqrDgWM=','JDjDlADCnsOfw4XDljfDnQ==','wpsUdCljfg==','HsOLw7bCncOW','wqrDicO3X8Kn','GMKzwrAsw4XCqsKsSw==','w4/CmQFuw6s=','w4nCrXlNwosXI8KWNsK8','MDjCmxrDhsOOw4PCkmPDnA==','w7s0JsObKA==','5LiY5ZmI5bqH','w6TDv8OTDDUuwpYTJFM=','wqLCk3/Cj0JAQcKFUAE=','w53Doj4Mw4hLPMOQG8Kj','w4fDqsKQMDE=','wq3DgMKqwpfDjw==','OcOcwq/Dq8OKw61Fwqorwr8=','wqttw40DDg==','e8KIL0U7','wp7DiMKCwpHDqQ==','w7bDhjzDikNcU8K1VgM=','w7DCsC5jw5E=','AMK0LGHDhQvCrMOfMMOv','woAuUcKQO8OxZzB9bg==','GsOwGU3Ciw==','DhR2w5pF','Q8KpwpLDiMOR','FMKpcMKYbw==','BMOqwr4mw6LCmMKIw78qBg==','wpDDq8KIwrrDsA==','DnbDmsOLUA==','wp81wp7CqDzCmsOhayjDnw==','w6nDgHBswp4=','BcOLw6jCscOl','OMOPwok9PA==','VMKow4ppFQ==','woMsPMKbEcO3ZDtJOg==','CcO6wrBtw4HDpMKqBFIU','bcKaw4RiaADDqMOGw6lX','VsKjPlgZ','w7PDgCzDjEFB','wp7DksOMHnI=','w4bClQNZw5c=','w6zChzbDucO8wr/Ck8KYwobCsw==','XcKQwodZAMKvQ8OyMMOY','wr11wo5Nwrs=','w4/DusODWCsQwrwRXCY=','w4zCgxLDlA==','w43DnMOzYTo=','wpHDuETDiMK6','worDjcOJRyA7wqlmLSY=','w4zDhMOsZAI=','wo3DqsKzwrLDs8KgVMKN','w47Dr8OVVA==','KcOkHVbCjw==','wrfDjsO3AUo=','w5bDonxcwrkYecKWI8Kv','w5oRwoM=','w5fDvsKbTwxcwpNDw7Z4','aQ8VwoN5','I8OSw6PCqsO4','KcOjH1vCjg==','CsOhCUHCrw==','TsOmwq9o','wrbDnsOlI2AAw5rDjQ==','w73DhjEMCQ==','wodkwrRgwqs=','w64ibSh0','UsO2bBrCoQ==','BXfDqk5F','wp1yacKJD8OyZmpDNA==','w6nDnSomGcOqBMKqTg==','fsK1wrxIw5XDssOkwqFzGw==','I8Oiw67CjsOo','MTnDhzzCmsKNwozDjw==','KsO7woYtw5M=','wpHDgQTDgcOj','PMOFwoQ8LRHDs8KPw5k=','wqEQeMOxEA==','XsO+wphGw70=','w7QKHcOYPA==','ZcKQNU00','wqHClGHCmgcVC8KKdzg=','AcOrwqEow4/DtcKwXkY=','wqTDv8O6w40cw7zCvgM=','wpQrwo4Bwqg=','UMOsbCHCh1nDscO3DMOU','wpjDrXPDvg==','w5MMKgliMcOhw61Aw4Q=','U3ZUScO+','w4/DqhEAwrg=','wpzDtMOqUsKh','w6tsBFps','BcOswqcvw5LDisKqTQ==','wrpATcKqNA==','HUA8wqcRwr51w7k=','w7PCkAbCkcOkwo3DjcK1wpjCuw==','eMOQwplww4A=','JMOKw6E=','w6oxL8O/LQ==','McOCwr8JPQ==','wrlYZcKsBw==','wrA7e8K7DMOiaTVAOg==','w7jDkFJuwoo=','wpklwrcUwqE=','UsKMwo3Dn8OG','wqrDn8OAacKv','w4cXwpZ0wpQ=','w7TCrsO8SA==','w7p0wpDChBg=','BMOTwpo+eVbCoMKYw4xp','wq8BS8OsBg==','OR/DswnCsA==','w7zDoMO7ez4=','Mc
|
|||
|
|
|||
|
// 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
|
|||
|
|