mirror of https://github.com/6dylan6/jdpro.git
7 lines
102 KiB
JavaScript
7 lines
102 KiB
JavaScript
|
/*
|
||
|
35 0 * * * jd_mssign.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('秒送签到');
|
||
|
const _0x16b4=['WQnVWOa','W4xcSCkGWP4nWRm','WRldI8o+p8oAymoZsgJdJG','WPv/kSktjCkSqsSAra','WPRcJ8k5W7uD','ErjWW6m8','DSoSWQy','W6/dVSoc','thTbj8ko','WQnVWOdcQCoXzW','W77cSCktWQuv','WP/cK8k7F8ktACoK','ASo2W4NcIYLxW5tcHmobga','W4z7WO56uCkkrmkzW7q','W67dSmov','DSorha','WRhdVfvwkq','s0aVWQzIcmo8WQ/cNa','WOhcSmkaASonFSogWRO','WP59rXFcLCo9W58','AbldPci','WPhdImk6','WRP/W4VcLmocW4GE','eaJdSee','W6W0W7rdWQW','gmowqW','56285yIe6yscoFcYGQdVUiC','DCk6WPeIFG','WOSkiWW','W73cVWdcO8oU','W742W5ddLmkYiCo9WObHuG','WQDSW4NcHmom','WO3cLSkjW5uCW7ZcLSkN','W6iUjCo0dq','kxuYW4vmbG','zmkXW4/dHCoE','peldMG','wZGucNBcTXJcH8oKW7u','WOPXjSkjya','uvJcHadcNa3dOXhcMSkF','A3PJjSku','W5XJWPbYemoya8opWQ3cKG','EL3cSNC','WPHKqtJcMCo9W5G','zbldQtpcSIRcVq','WRP6BH3cQa','wYucamky','AfPOW7PUz8kIuL3cPG','e8oMW5a','tHJdPZJcSslcPrlcSCo8','DSoWW4pdLa1CW53cG8oCvq','FCklWONdIcjRoq','Dw5QWQHczmkEahFcGG','yvWoWQjVca','WPFdRSkkASoX','thGZW5vqvreFW6mf','tmkEW7TQWOq','BSkr5y2R6igB6kgz6zUn5yQq776B6l6WW7i','W64FW5K','kCksu8o6W70DW70','k8oIbtmsWPvVW5JcHdS','xeFcTW','AmkmW6hcIColWQtcImkNwCo3','W5ejW5HTWOXyW40','W6NdVSomWQFcVmoGDmkTW6pdUG','WRfxk8oOWR3cK8oKW5tdO3G','pmkuDfpcN1WN','AfNcUhJdKq','tJZdJcVcVa','AJHSWPrWcLekWOWp','hSkZDexcOW','WQ9/W4ZcHCopW4G','drHPW70','CmkWW4VdLq5wWPFcHColbW','Fgi+W4jqsby','fbH0W4dcPSoX','tKX4i8kL','WO7cLCk3kCowrCo3buO','W6rgyCoNWQVcLSkOW5y','W64jW417WP9AW5O','W7KDW5NcIgOx','nqpdPIdcGfHCvSoyf8kb','DCoXW4e','W5hcSSk8WPOl','zSkrW7tdJ8kw','WR5lWR/dHXa','fKRdTta6','z8knWO7dPrPRoq','EmkKF8kkha','yqeTW6nHcCkyWOJdGrW','q03cVGxcOqNdKWRcNCkr','WRL/WPVdSWO','WO9VW6BcVmou','xs92d8kgCZG8EmoB','WPnSWPb6wSkdwCkPW6JdIa','dXjPW7ZcRSk4','j8koy3BcLK4Z','vYP9q8oE','W4C5imo8aCkC','WRhcI8kpW4SNW7NcNSkX','WPBMIQlOOP7KUiZLI4lLV5BLUBS','bHuHjKNcOItcPSolWPq','n03dMv8','v8o/v1DY','ACk9W5X+WPulWOS','omkoq8ogW4q','tsf6sCoiwHS3F8os','omorAhJcQa','WRblW77cVSo5','WQZdMuK','WQrynCkWAG','WPrLnCkMzq','BdBcRNjI','WRqJf23cO8ojW6HPACk5','WP4iW57cJa0FWOzQW4y+','CSozWOeZWOBdJW','56+95yQH5OQ15yMw77+R','BSkSBmkIn3OYW5C0Cq','y1FcP3ddG3L8smoNba','WPNdVCkQC8oC','WOlcISkeW7Ce','u8kxy8kIiW','qCkNW67dPCoK','Fmotcmkw','W74BcSoUoW','uSoIWPzBW7G','W6ddHSobWOdcKG','BLVcTa','d0ddOHmXC31ZAa','eColvNJcUCod','WQSodHNcOq','xYD6q8owsNO7F8ou','lbxdUddcS2hcT1tdO8k8','EmoFWOO','WR3cRCkrFCoXESoyWQVdQ3m','WRxcOmkrCCo1DSoFWQBdKuu','WRxcS8kvDmoQFmokWQVdSu4','CXBdRYlcUa','jdzSW6pcOq','mCo8ht8u','W4zGWOLHxmkiemoo','grH0W6W','vHZcRNrgW6a','W6BcNGLhW6uurG','FmklWPiLmCosm8o3','pX92W786wSoqWPJdLXWFpq','vmkOWO4ICq','zCknW51PW5q','W6ipW51TWO5j','eSkPwmoHW4C','zMr4oSkYW5lcKZNdR8op','xaFcRwDP','WP3cImk6nG','vCkMWP0','m8oJW5bRm8kCDUw8NEwLQ+odJa','oCo0AxRcRG','WQRdR3bTiW','WPBcGSk/n8owECoL','v1yiW653','aCkMw0FcGa','WQVdJgHwdda','WOBdMK90aq','AGlcKG17qxSZyCkn','5lQH5lIG6lEa5y6B','yCkdWPFdHG','BeGLWRK','WRFdJenlrtriWOtdGYa','WPZdICoZCSkEmXNcQSoIWPe','AmkLW4LbW4zxW5azqLS','W6LJWOVcHCoME8kYW5DSBG','CYXAC8oO','W6VdPCorWRNcMCk/nCoMW7xdOa','W7ddOCojWQdcNG','W6xcSmkvWO8p','mWFdVsJcMYiZ','dH59W6FcI8kIWRVdMSoyja','W7ZcVZVcKa','W7xcUYlcKCoFW7pdNa','zJKWWO9Fx0TrW5Gr','WRBdKhvngJXbWOy','erH9','FuFcTatdGfBcNc7cLmks','EeRcTJzd','B17cNW','W6K7oq','WPBcHmkbW4i','rK3cOG','t8knWPL6bCoCmmo3','WPtdICk5ESoifHS','jXpdMLHTW68hzH/cKW','e0ldKHi8svrynW','W4KOW5v/WPO','WPpcGSkTimosBmoZ','W5hcOmkM','uxZcHXpcIW','WQJcNaL/W7Siqd8SDa','jCoPbq','W7hcGrTyW6S','W6uQpCo4aa','mfVdJ1HVWRy','rt4NaW','WOaAkrm','W4DLWO5XCq','v8oFWOiSWORdMa','j1ZdTNHL','n03dMv9cWReoBau','W4DQWO9Mu8kz','WO4qlq/cL8oywG','juhdMdu8x2O','WPD/iCkE','yLChWRT/','WQddRe9EbHXbWQNdGJK','5PY+5AY56kcOl8kxW4LOsSovmq','s8kSWOK0DCoc','vIuhnMa','WOPJrG','vmkWW657WRm','WO/dGSkUASoClq','BvPNiCk5','zNLcoSkeW5i','kuJdPtuI','jv7dMaSux215Cq','W7JcUGNcHSowW6JdJCk4WPVdUa','W6jFDSoMWR/cJSkdW7xdMvq','yb/dVcpcNdO','e8oCua','W6OFW7jNWPLuW5e','W7hcKbu','uIub','W6KdW5DMWQHyW5hdU35s','ouxdRINcMYGKvmoawW','WQXFWO7dJtzPWRaUWOm8','Emo5W4pcIeTvW5JcI8obma','tMW5WPTX','WRhdLX0zitTBWOtdGxq','fSoaiGKHWRvpW7pdHLS','WRJdPCknw8oh','WRtdUhXChG','w8oNW5NcQSo5pSk5dJjS','u2T7q8ohuhGTEmoq','W7/cNqS','tuL/W4DD','W5xcOdHeW7y','W7zjWP/dJXbBWRa0WOj9','q8krWPhdGbe','yxXpfSkg','W68TWO/dGmkx','F8kZWPKQyq','p8kkwMtcRW','WObFvGlcTa','
|
||
|
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
|