mirror of https://github.com/6dylan6/jdpro.git
8 lines
142 KiB
JavaScript
8 lines
142 KiB
JavaScript
|
/*
|
|||
|
天天来赚钱,入口:小程序
|
|||
|
updatetime:2023/11/06
|
|||
|
author:https://github.com/6dylan6/jdpro
|
|||
|
*/
|
|||
|
const $ = new Env("天天来赚钱");
|
|||
|
const _0x55a3b4=_0x1c63;function _0x5eb0(){const _0x5c9070=['W614WQOrWRm','e8oYhgq/','uSoRwmoB','W4jdWOq1','t2VcK1qkme7dISosW4reuNCtumkQWPHiW7v7WQ8qWR7dJSkcWQxcU8k9B8k1W73dUxNdMxuAD8ogW5ldSSkwWQSstaj0WRpdOwtdSSo3WOTBqqZcN1zsc0RdJrjDW4vvWRrIW4Lps8oZW4hdH10hWPFcUCk1jZ8Go1/cMCkbWQldSw3dH8oEDtGNdNtcG19xkHFdH8oIWQJdMb7dKmonWQddNHCRWRNdKKRcKZrvESkYB8oom8oSkSoEmSkpW690WOZdN8kfW5GYWPRcHCo5WRnMWQG+j8ovWP4UW5v0W4yNjSoMW6FdU8okWOvhWPpcK8ooCXpdG2qrj1ZdU0SwWOmSeZrQWR7dG8kGW55mW7NcMWLcW77cT8kUW6JcS2tdQN/dT8kcm8kbWRVdHxnJWRNdKCoPW6mly8k2w8kTj8kzFHXoWPvoW7BcNguNWQHbWQ3cMCoKW5ZcVXFcO8odW4dcNmouW7xdGhmAWOXUn8oDB8ojWRVdJCospCogW5zLzmkbqZNdVSoKW4jxcdTYW7ZcRmkdWPKxW49kgmkQWPjqeSojWPWIjmozWRhdIv83EuRdMCkzxtKqW44Heqy6kSkjWQX0WOxdNSospmkpxSklW5VcGSkuWOfQomk5WO/dNJBdNSkZWPZdRmkEWQlcRw0','WQzIW6BdPCkKBW','asVdISkm','yCk7W7vCWRBdJ0hcI8kJoSkW6k275Rgu5AE96lES77+R6k2t5QcU5P2n57+F6lAb6ys96k6h','v8olCCoE','ExiG','hCotWOndpG','W6hcIConWPhdSCoOWOtdSmk7WRG9zJtdMYiDWOlcLCoDi8knW54OvCkJW58cFmoiBW8QWOquW6PU','yNiCW6LwW5pdOL/cV8kRWOudWQ5EW4vBW6VdGtLEyCkqwrZcGmo5xSoWW5FdL35tWPLux3n+jvlcU8klW6ndWRO+tCkUamonWRZdQSoqy8k8WP3dSZHCW5zAW7KNW7zc','rmkkWPSF','WOvEWPZcRuqy','W5lcJSoCuCoLta','tmkeWOG','W5SHge4','W4ZcISon','wmoTWOai','WPhdMmkBari','W4tcHCol','W7v5g1K','W4lcLHqVWOm','yCkPW7rtWPa','W4HdWP0X','W7OWWRhcOZBcJSkgW6FdTW','WRVdKSo+yKPy','W4/cGSoEsmoirt9j','W4O3dKi5','W7eSWQpcGGm','FfC1a8oq','dCoMbvGC','W6qMWRVcLSk2wq','WQtdGSoYrLfunG','umoXuCo5W6q','WRdcThPgWQVdQL4CWOihhCkLi8odbSk5','A2RcGeK','WRBcGuTSWR/cL8ka','W7LThhvPW4RdOmkYW78','W6i8WQ/cVG','WOZcLu53WRi','a8kagHH+','WPyfgYRcOW','WPVdPSk4emovW7a5guTSW5lcHW','umkkWP0nEW','WQldSmopBmkafSk1EG','W6uMBSokW7ldLSkZfSoeW6VOR5tMSPBLP6pOTlRVVOlORBlMOB/MNQNNVlJOT5RPHQJORky','W7brWQe2WPxcPSoh','ExiAW7blWO7cPbBcTq','k8k8gSkyWQ7cMmk+W4qXW7hcRa','W59Qc25jW4ZdPmkX','nmk8mZnR','W7faWQu/WRNcSa','W5BcS8oVCSoT','wCoJBmo5WOO','yCoLW44UsmoOWPldRCkvEa','56Yl5yQJ5OMG5yQiyhq','WPBdJbuQW7mAraG','W7Gliq','WOac5AEy6lw1gSoJ5y+k5zISWOK9','dCkKWQnX','W4BcLSoKda','W7XvWRqZ','W506dG','W4VcSmoZW75r','jc13q8k1EmkHWPdcK3fRdfu','W7eOAmoyW6q','W7pcPSoxW7DV','W7bJWQZdMSoYWQtcTHVdNZ5NW4fCW6tcTI0','WQnmW5hdKmkV','eCo8bhyPp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kZW6VdQfa3W5SkdxngxCk6W77cNcJdTHmpxCkoW4pcV8kgqCoFkSkowCknBmoCW5xdKfvBe8oW','WPldO8ktpYi','W6PvWQ42WP/cUq','WQddR8k/ca','vSoNBSoipmk7','v8oZySoVpmkYCa','WQtcM8oAmG','W60RWRFcPcVcJmkeW6ZdHKuYWPq','BSoltSoCiW','W5bNWPqcWQO','WRddS8oZD8ka','WQBdSmoVBa','aColyJ7dG37cTdG6yW','WQdcK8oudCoW','iCoMWQVcNSkgtJS','dmkrbXe','5B285yUb6ys45BM95PAo6yw277+C','WPxdNCkmfCk+fgngCSkWW6/dHmoL','W5ZcNSoJeCk8EfbfWQpdLbVcSmkTW63cQ8kIW6tdS8o3W78UWRfPpmo1fIddLeVcNW','W60MFCoUW7pdJW','m8oMWRJcQmktycdcSa','xmkBjg7cNW','W7/cN8k4kXuzEg1rjCksW6K','BSoHwmoB','W7W9W6xcLSoN','W77dULHmemo1jg5VW7pcJwa','iCoZu8oUW6RcTCknW4eTW7pcM8koW7pcJIRdVeigW7BcNmoWWPtcQ8opjCoWWR5Iumk6pxaWW7tcI8ocphBcNWFcHqq8tCoPW6ldQmoeCxhcQxNdQCokqCotrmoBpSoVsYlcLIhcJSotW63dUfJcV1OIyb/dTMxdSdH8W5rrW5ddI8o8aGNcHK7cRmksEgmcW5JcPCowW7tdQtGSECkucxvdWPj/c8oFD3/cRspdOCkzksRdMSoUFaHnhGZcNrtdU8orW5BcSCk
|
|||
|
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
|