jdpro/jd_mssign.js

7 lines
104 KiB
JavaScript
Raw Normal View History

2024-09-04 04:24:54 +00:00
/*
45 0,14 * * * jd_mssign.js
*/
const $ = new Env('秒送签到');
2024-09-05 01:54:25 +00:00
const _0x498c=['hCoWWQK/W4e','WRrtWQtdKCoJ','W4dcKmowW7FdG8oSmSo0','W5NdNCklj8omWQxdICk3WQhdJW','W5NcN0yKWRnxWPJdSJWG','nCo4W7m','WRVdJ8oKuCox','WOddICk0WRFcOa','W6fxASk5vCkUW6Tu','WO7cTgrlW55QWRK','WRlcO1fHew43WOO','5ywr5l+r6i2q5B2TWOy','W57dNCkjpCkyW60','WOrpWPv0WQDLuMPHW5q','WOldMYlcPa','WOuvWOWQWR47uYzVW4K','WRqjpmo9ka','d8olWQqUW4u','WOakzCkc','vCohgdZcTW','wCkeBtJcHCo1WQNcHmozkG','WPZcTwmuWOP6','pCoWW7fY','vCk7WPFcLSof','W6Kfn3VcP8oV','wmkXW5K','WPSBW6vCW7S','W4NcOxexWPDSW7BdNrX+','DeuYW6hcKv3dOubVoG','qmkkWQJdGSkd','5lQV5lQi6lEB5y24','W4POyLJcUq','WOWyW6vrW7lcMJG7WQeB','W6jiW6W6W4ddIhpcSc7dSG','k8ozxwFdQCoyW6KdlWq','q39a','WOvlASkVWPm','dCoUWOO','W407EJK','W7ZcQSokW4VcGG','WPpcQmkWo8ogDSoOzNap','W6JcRf4Cnq','h8ofaCoq','WQeHgI7dNCk1WPibkCk/bq','WRWyW75xW7tcKq','WRrNWO7dRmobWRNdH8oL','WQNdT8o0','WRzUuSkBWPiFWPlcTCoceG','WRTQECkxWO4oWOtcS8oqiW','WOSlzCkEbW','ESojkcpcVSkGWO8vW4JcVa','cSoXCua','BSkDW4eMWRddJM3cMvO','lSoiuxD3WRHOW43dQCou','W5vzW53cLt0hWPiDpsS','E8ojrMRdQmkxWPjAzvG','FhKYWQJcJKRcOuq','WOyazq','o8kOE3qZ','qmkAWPxdP8k7','m8o5WROgW6G','6lEQ5y2U5lQcymo2xSoaqKPw','tuO7W5ZcSG','kCozqhC','WPr6WO/dU8oPWRhdHmoLWQW','tCkiWONdR8kI','jcbaW6ebW77cPG','W7pdGSoSeCko','W71Itq','C38qW6RcK0ZcOq','WQldUmkl','pSoTW712W40nWOxcKmoKW7q','d8kXiHz3W614','israW4ajW6RcQa','WP0OxgNdQrlcNJpdHSoW','WRhdR8koWRZcVmo8W6eWASkL','W701pMtcHG','xbbOW4u','n8kBiqXU','W4KYxHdcSW','WQRcK0moWOy','W73cQKeMbgGUW5XXWO8','W5VcJ8ohW7JcGSoCiCoQf3m','W6GrDmoGA8k3W7OwWOSi','W6xcRCojW6CgWPmLcmolW5Gk','ACkjWRldO8kps8kIW70','udOx','e8ouAKDyWPGaWRlcMmkX','vYOCW5lcNsfdWPnzra','W67dHCk8e8ks','h8kpWQlcRmkE','W7xcMCo7W5VcUW','pmkslZBcO8o+W65vW57cSa','vSkvW6OtWRG','cmoPl11eWPfEW7ZcUmko','WOXzWQjZdG','W6K8s33cICkAWOu','W7CawbtcGG','5y2r5yIc5yAZBmoCW68S','sCk0kZvZWOy1W6JdIfG','vCo1WP/dICo9','sgK6W6dcHKdcVq','ySkCWR/cNCoe','FYe6W7dcMGJcTu5IkW','kSo/W7T2WOboWPxcNmo0W7e','Dg0XW6a','W70viq','o8o+W7PI','p8o4W6zdWOboWOK','W5lcLSoSgmk9WOjtWOtdTMC','W47cKmo3W7BcOSoWlCoXdvq','dCk3WO7cQ8os','k8ovrhldOG','rSk7W400WOldKa','EhHTW6W/','tbHOW4utWRS','6k+05yIH6zUg5OEP5z+jhCk7tKJcVW','W6GexWlcHNe','W6DFtuVcGa','W5yIW57cQCk/W6ZdNmouWONdOYTY','W5tdT8o2W6D5','WQZdUsZcPmks','WQpcJhmuWPW','o8o+W7PIWRzeWPxcNCouW70','W50AW5xcLc0mW5iBFty','WQKWW45aW6y','oCogkSoZkG','z2PvW6CoW7RcT8kPamkf','wrXYW4uDWQldHW','E8kQzSkwWO0+WR1ylSoS','WQvmACkTWQW','x3veW7CNzq','WPymBmkEedaH','fCodcCob','WOhcPM4','cCkPntnWW7K','xCo2cWNcRW','eSkYnW','nSo6W7ePW5GuW4/dHCkSWQW','W5qdW4tdIYrzWPnriIO','W4xdGCk6jCkuWR94W6VdKLC','WPFcUCoNWPNcG1tcQeu','y8kaDW','amkGzxaXW4O','W4LpW5jU','qSk9kSkdWPeR','WQOyWRynWPO','c8k/WO/cOCkcBG','6k2A5yMw6zM05OwB5z+EW4JcICkTWO7dNq','WRPUua','kCknW7/dOSkLbmkSW7FdRmks','hCoLB00BWPToW7ZdTSkB','u8kUWPpcNSoDiX4','WOpcR2yIWOX6','WRnVqq','hmkXkdvS','tCopvuXrWRzd','W6BdHmoQomky','WQpdVmkqWQC','AgKVW7dcMfe','E28OW6ZcGKZcU1HfkG','W7LEp2ZdVCo+W5i3','W5ZdSZjxW4C7WPJdRbjjW4tdJq','WRXAWQDg','tmk3W58V','kczqW7CqW60','W5hdH8o1gCkm','6lsL5yYP5lMjWOxcJJdcV19NW4y','W5BdH8okW7b1qhFdQwBcUW','WR4Fvf/dIG','wgjB','WOVdLSkZymorWRn+','WRzsWRbmoCkQW5HU','WQ0EEmkLDCkZWQ0qW41f','55Mj5O6t5l+D55sJW6bwpmoarSkd','lCoxWOG5W5xcPmoGWO0pxG','WQ4fW68','dmkYWOtcICkeCmoA','W4S7W4e','WQddTSoL','k8kmWPy6W4NdSmoJWOizxG','WRJdSmoTBCkM','C8oEpZBcVCoUWO1wW4VcTW','W4BdO8kWW5VdGWhdRwvwxa','WOZcSSo3WOdcMKq','DCoyka','Amkkza','WQCsW6PbW7lcHJ8','CCosmIdcUCoOW5vzW57cTG','WQBdUmkkWQzBWQy','WQRdTCoTBmoR','BmkkD3OXW7ldHG','ymoylYBcOCoU','55Q65lUv5lIA56+F5yMm6i2H5y2W','W6iiW7v7W7JdIsZcPItdRa','mmo6W7fsWObEWOO','WPKKW45bW4q','y8o0ptRcLa','W71WxNNcHa','ubHRW4q','gSkHWOpdLmoFobldSG','vKtcI8o1W7S','DmkkCeG','W5xdI8oXhCkoWQi','WQpdQ8oRzmoWxW','hSkQCq','WOVcQxieWPf9WQxdJI5N','tSk/kSogWQ4mW7rUiSo9','cCk1kcP/W714W4NcM8kG','WRtdRSkD','5BAl5AEV5PAP','pCoUE2j0','uK7cRCosW7G','fmk7ka','WRfjsmkAWOucW4/cOmosna','CMulW5tdNmk4na','6zA36Acp5BMU6k6O77+7rCkvWOhdSSoR','WQFcQeu/mhqZW4LCW4q','FwKOW6FcM0hcTG','y8kaWQtcUmoo','wSk4W5e','W6VcJSoCW4NcRq','vCkMWOldLCogobhcUcXV','xCkaW4C3WRZdPx/cVNS','FrH0W4u1WRJdGmke','W74+b0xcLG','WRruWRq','W70kphJdV8k9W5K/ESo6','W5KppSo1q8khW452WRi0','FMydW6ZcMLhcQLnTlq','sCkkW4qTWOa','W79gF2NcOW','WODtWQ7dU8o+','WRbpWQDxbmoXWPOKhd8'
2024-09-04 04:24:54 +00:00
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr