mirror of https://github.com/6dylan6/jdpro.git
7 lines
108 KiB
JavaScript
7 lines
108 KiB
JavaScript
|
/*
|
||
|
35 0,14 * * * jd_mssign.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('秒送签到');
|
||
|
const _0xfe41=['gCozW4dcVYNcGhdcSSkhW6C8Bq','k8kIWOpcVCoJ','WR4mWRLhW7xdTW','uW9MCqycjmknj1S','aSoYWQbLgdtcUJtcPmkT','CWf6zJSEn8kb','W7RcV8oF','B1nVW6y','W5PQWRFdUwXP','W6Cqif/dPa','gmkVW50vWR8','WPlcRfhcHey7WPe','W4mWexFdLaCHhqGy','hmo/WO9k','hSo8WPbaW70','cCo2WRy','zLf5W6hdHbBdTG','amoiWRu','W7BcOHFcTSoh','W6/dTeqgWRq9W4rqWQ/dVW','W6z6WQNdRMvV','kxJcJYZcIa','WQLOWPGBWPlcTCoRW5lcTtK','d8kZWOK','aoISKUMgKEAuOoEyLEw8LUImQ+woJHlcIG','WQuAWOrDW73dPG','W5CllxXfu8kbqcCJ','W6JdQHOQ','xmkhW609u3ZdJ2ZdQ8oq','W7tdQG4','d8kaWQzWhdJcKq','mfv6W6ldPWtdUSo7W4na','WO05iq','iCkxnmoWW48','WQfSxmkpWOC','WRZdImk4W6KaCG','WOhcVuFdNqOT','ixWEBmk6','fNJdICo4fG','W7NdTqa6','WRmyWPjC','WO9HxWzEWP4euvNcHq','BSktgxxcMq','W5ZcNCohWOjO','udFdJ8kNr8koga','WOn/Db9dW5bodeVcJG','hx4DBSke','W6ldPxmSWQe','WRXvAtuoqdu','WRzdD8kpWRDbW7C','6lAw5yYB5lQLWPFcItKLCeSv','FNzsD8oq','WRb4WOaTna','r1CxpmksxG','WRKEWPPn','qCoSW7NcLCoh','BmkwbCo3kG','W7RcNWNcMCoi','W5NcImoVWRBcOa','WQBdP0ukWRWXW5uFW6JdVq','lCoPzCkMiq','WOSYE13dUepcMSkSkgq','c8otF8koaG','6i+S5BYA77+4','WR9JW5GBWONdSCo1WOddVt0','WQvpyZG9vIGZfmkx','EhpdLSk9WQa','cCotwSk6mW','W7W3lKGb','W4/cUhldIGuZqbHIW4u','rmkMfL/cSCkeW6tdKapcOW','WPfWWOGagCkDW5/dMW','fqtcM8oECCokrCoLW4T/','55Ij5lMu5lQk566I5yIE6i+35y+F','W5lcJCowWPhdKgi','W6xcL8oIWPPciw4','W7yllG','l8oeWQ94W5u','p8oIWOfZW603wq','pCoVWP5cca','b8oKWQXlW5XM','mSkmWRdcL8o4','g8ovWRfNW48','6yg66lYJ6iAe5P2o5y2R6iYK5yYvW4JcM8oG','WOdcQfJdGri','o286Fmk4','W4fHWRddQxj4gmkCW4BdIq','566U5yQI5OQt5yQw77YE','W5yJhe4CWPaqfe7cVG','cSoVWQHk','W7BcNHC','jIBdUG','lmo3WPvZW78','W4BORRlPHlpML57NMOFLV43OJkBLJAVdKtq','jc/dSG','s8oNW5FcSG','tmoYW5dcRtC','WRNdUCkeW4GMW6xdUCkZvuW','oMtcIXW','W7GGpgOa','WO8YiW','iYNdSa','WOBcQLG','wmkrbSo3W7zaWP3dTqW','vZ7dMCkEqSkj','vCkzmhRcHW','nWCHpCkyFCoHca','W6ZdSfS6WRy','smkfWPVdPMVdKwBcIW','A+AjV+IGOos7J+wjJ+w9IUw5LG','cKtdPa','xCkedmoJfG','AeaAaCkh','WPG1eNpcOq','mSoJWPzOW4yItCoNWRJdPW','qGv7DX4e','iSodqCkTeW','lCo5WOa','W6JdSf0tWQPYW5fqW67dQG','W6fhWO7dHKi','WRqRWQnGW6C','WOpdHCoSEKW','WP5Nu8kwWPm','W6OvkSonW7GuWQK','amkufSoV','W5tcP8oRWPZcQq','hHVdHmoorq','d8oZWQDjW5O','W6RcNI3cOCoIlq','WRGKWO0fWR/dT8o1W5G','fmopWR4','W6BcTSoiWPNcTa','vmkJn0lcHmk7W6ZdIWtcNG','ra9BDGazp8kj','W4ldQqZcNfrGW5RdH8okW40AW4jz','eJ/dPqS','uSkdWPFdUKhdG2RcNCkgW44','zSo2FWuj','uSoTW7ZcS8oz','WRZdVCoK','566x5yUP6yEtWPRWPjoN77MY','BSkvm8oJgG','z8ohW57cLSo5','AmkmmSo0osRdQdaNWOa','WO5aFSolsepdJdJcIsq','w0jJvCoOW74QW5FcICkN','rav7DG','tSkal8oZ','ACo5WPFcKCoIWPzNW6pdHue','uW9Llrexomodmv0','ihddNW','W6ONWPekWOxcPq','W7JcJmoWW7ew','BeezkCkKwmoffSkBaW','W53dRdtcJvrU','n8ovCSkPqIBdSNuKWRy','W4/cV8orc8k0fCkeWQ/dISk9','mmkytSkGsKmfW4r8WQi','nCkZWOlcKCoGWOe','W7VcOSoGWOvIW4/cOCoL','rmkGpSoLgW','FCozWQVcUhyCWOdcHe9D','yKDgW73dGHJdVq','ASo7WONdOdmEWP3dGN4e','eSohWPH+fYlcGdtcOmk5','WOdcQK7dLqS+eW','W5tcI8oaWOa','ACknpCoIlZC','zJ7dK8kHqq','y23dLCocCr5ovWFdHa','uCk/p1xcKSkyW70','lSoHWODlW700sa','WP/cT1pdRrqR','W7FcLmo9WRv0','tmkhWPZdKeO','WRLpASky','c8oCWOr/W7C','jshdOtJdKG','yGjgAZ8','W6NdQ0C','xCo7W5BcPCkSwSkKW7VcHmo7','W5aGfL0ViCoVsG','WPVcVhhdJWaJ','WP4dmKlcT0VcOCoWlNW','rmkKnG','mmokWQjmW7G','W68oWRtcGh7dJ8kEz1Xc','oSokbCoMvW','xcH6CYy','qSkGuSkraConwxOzjG','b8kEWO3dO3RcIdVdGmojWQK','r8k1fhNcJq','5Okl6k2n6iYs5B2J77+8','iMNdMZZdRW','WRinWOvhW6pdN8ohnW5d','urjHluDdzSoayai','W6lcKSosWPzp','rSk5nLu','pSoYd8om','WP3cVfhdMG','cZhdQ8obAG','CLuhmSkHrCoohG','W6hcOSkZpY3dSmkBWQxcPSoqWRNdQdq','emo/WO9bda','WRPIzCkLWQu','ew/dT8oEcq','F8kjoCoCbZddQa','WQ8TWP8CWR3dRa','fmoBWOPPW44','lmoJWRrZma','w8o8W5lcO8o0smkaW7hcJSoQ','rSo7W7dcV8or','vCkEWO3dMMC','tttdNSkTqSkCcW','wSoTW4dcOSoTtW','W6ubWOJcTua','amo1WPfKpq','oh0pw8kalcjunfS','vKHVgCoCW5OOWOxcQmkh','5lI05lQz6lwp5y6P','kN/dHSo1ja','WQfLWOGnpSkuW5ddKSkW','WRjiCmkzWQrdW6ftoci','phtcLr4','WRJdPSo3EwZdVmkhW73cTmo/','WPDNuSkRWOi','v8koWOO','FSkkd8oKha','W7CuoMDDaty6h8kou8kO','isFdNCoqAXu','ibr+W7RdJalcS8k8WODn','WQ8pWP84WPS','W7qcjG','a8k0hCo6W6u','WQ8rWRvrW5S','WRtcVmkoW4e+WP7dO8oNdti','WOS/ivNcOedcISo7aM8','A2HpCSkGWOH+WP3dL8oM','sSkoWOhdUq','muhdImohea','W4RcOshcUmo8','WPPtBYrgCIeYh8kr','icFdGmoeFHPF','W74oo2nlgW0FjCkO','W5qoFSofzuJdPJi',
|
||
|
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
|