jdpro/jd_mykxj.js

7 lines
191 KiB
JavaScript
Raw Normal View History

2024-08-24 14:08:49 +00:00
/*
1 1 1 1 * jd_mykxj.js
*/
const $ = new Env('母婴开学季');
const _0x5172=['jSo9W6afW5a1m2RdISkk','W4OCrtD0fSosb24y','W6VdHmoxWPNcLG','dCkVWQRcMmkHDW','WPdcI1froa','FZiKWRSl','t8oSxmkZWPK','W7jAW58','u1KrgttdRmk0kSk4tG','W6ZdGCoBWPZcSW','W5/dTmkeWRO','WR8KlYJcQCov','WOuoEa','leX+fGW+WPK+kqq','W4JdNupdLWW','ot3cVSkUWOTKAmouW4aN','WRFcImo+ECkIW5BcNq','nmomWPpdMXDXDG','W6tcSLWylW','WRNdUcaMWQpcHMvN','WP7dTaL4dqdcRSkuWPKu','s2TsWPe/WPRcSCkHvJi','WPSYbCkGfG','WR/dIgboBG','W6VcL+wjPEMrG+wsVEwhPEAlLEIIGEIhOoACMG','W7SJm8oKW7u','WR/cKur9dmo2WQbCqCkO','cCkmWPyqWRVdRCopA8o0oq','W7P4WPJcKmkG','sh97','l8kZW7yb','W6RcTxmBoW','gva6WR/dU8kUW5uGW5O+','W57dRSkmWQ0cW6GE','kMNcTCk6WRhdGCoEcg1h','C8kmW7u','Eu0txH4','CSo2WQvaca','F3hdV8kOC8k1zG','W6H2WP3cPmkk','WQvQnJdcKSoch1W','W4FdUN3cLa','mSogWP7dKaG','CmkgW7hdLLCuEa','d8oaW6JdGZW','W5ldV2pdQtu','WOXUW4/dTwysW7WaW40x','W7pdSJ8','F8kqbSoxW48','WO/cNCoLba','W4tcNCoYewpdGxRcOmk3W7O','dSkPWOasW4a','e8o0W5DLW5VdP1dcPar9','fmkOWQ7cMCkNCr3dRq','mSkazG5AW6VdOCkxW5tdIG','WRBdO8oitgakzZdcQbO','W73dLhf5W5a','WPddICoBzgu','W6BcOaeTiCkKW7OiC8kk','DCkmW7BdO1OsEG','W417WRdcP8knWOLMWPtdIa','jCk9W7u','WQRdNhH8wa','kmk+W60vW5v1F3BdJSoc','ESkUoCoYdq','nCkGxGy','EayQdr8aWPCBoWK','j3nBpXC','WO3cPLK9oJBcS8kgWOyI','tmkYa8oxcvSUf8kCWRC','hv9/eG','W7tdUw4','5Bsa5AA45Pwj','eCkIdCoRW4T6WR3cSmkJ','W7JdPhO','W6tdGCkNW6JcNW','DLCgFXFdNSoZ','cmo9W6TFW6S','WRS6aCkRkG','WORcLstdRCoX','5Q2HzCk95BsR6kgY6zUW5yQg772J6k+/6l+q','WPBdPxjDxW','y8kKWOJdIGa','WRykFXe','pSk0W4e8W4NdVLpcPdzR','WRFcNerXcmo6WQDrE8kE','W512jSk9j1bpya','WPjJW6pdS30oW74','F3TdWOPKWRlcOSk9Csi','WOhdMwy6y8o8WP5QW7C','W41nW65oW5W','qSkKaCoCgvWSnSkAWRu','WPHkas7cIG','WPCzya','WR7dVmocrK8czIa','aSokW4FcStu6vq','WOFcK8o2','5y6r5yQO5ywdW5HKW43dPq','WOC4Fr/cUq','WRBdRMddTai9pSoA','g1/dQq','iSk8WR8','W6G1taTY','W47dTCkaWR8UW7ieqvtcTa','ww1fWOOSWOFcLCkXCq','rwPLW63dKmoX','W6VdRgXRW7W','tSk5aq','WRfgW5L5W5GjvM1+','W6NdUgddOaaunCoCW4Ge','qmonDSkvdGldKWZcO2a','W43dH8o7WR3cIGO','WRbOmtlcSmosg0dcJMm','5PY05A+l6kkrWR8gW53dSxNdVSkg','sNu+fvVdK8o9gCo9xW','z8kcfmobpa','W7FdR2ZdVJyInCogW4Gi','nCkNFa9nW7BcVmkcW4tdTW','W7ZdUhVdTrCnoCoAW5qY','mSktW7ddIK4km8oEvW','cmoyW7FdRHO','W5FcSIy','bmosW4pcJYGFscrclq','omoqWOxdKr10F8kXdCkJ','WO/dKmoYWPNcTG7cTa','W65hW5fSW5GtqNm','WQ3dHGRcQa','fu7dUdRdNYBdKGOCW4i','AwpcQG','WQJcJCoCeuq','lSodWOhdMZTFy8kZ','nSkMzdm','W5ldNCo+','iSkPsXxdKSkAWPNdRG','W7zqW5LRW5GVra','D8kMWO7dGXftDCkyWPa','5QYTv3ZLTOVOO5xPMkpLI4RVVyhORQ3OVQi','fSkyWOtcT8kp','sgTVW4NdHCoRWOG','BCoxWPDunq','WOfIkW','av3dVdZdMZVdOHiNW40','W6BdGSoKWOlcHWGMW71/W5e','W47dGSk/WQ/cMIVcJe1req','lSkcDYDbW73dPG','x8k/qSoWWObeWRJdRCkRjG','W4JdMhKghW','mYVcRq','qCkolmkqcWxdLWpdKsS','W7/dRMP7W63dLCkBWRe','WOJdOsXNwSowWOvoW6/cUW','WPJdPMHkqSkFWPfcWRhcUa','WRJdSmozs1ucys3cOXS','wUITRoMfToAwOEEBHEw/NoIoK+wnNZnR','W6JdMCk7omkxW4tcNgHSWRW','WPpdRwv3D8kvWO1d','oLzTcXSMWOKKpG','ELKgwa','BSk6WOpdNaW','h2rbdtW','b8o/xSkZWP4','Cc0J','rMDb','ACk1WORdNa','W7ThW4PGW48quM1MW7u','WOJcImoyc2ZdMexcUW','WQCIyd3cGW','WQNcK8ohexW','WQSgWO8HWO5RfZzEW5W','W7zAW4G','WOudAbJcIW','W7tdI8o1WP3cLWGM','WQldIGdcI8oc','c8kaWPCAW6hdUCo5zmoLkq','a8oIW5dcHq4','W4VdN8okWOlcPG','omoVr0NdNCkWW4ldOmkcW50','5lUL5lII6lsQ5y6o','jmkIW6CoW7i6BN3dOCki','yCo4WQHkWPTXnJpcICoN','B8kGWPpdIqCNo8oAWPDI','pSoRW4hdRbu','WPaEyJZcJmoMzam','W4qBzrtdKa','fmo+W4PY','WQZcHmoOFCkvW5JcNgPW','W6JdT3xcGZO','pg/dQCkvymk9sGRdMq','bCoOW5XJW7ddQeNdRa','p8kZW7elW6uIBhW','WOxdTh86fq3dSSkkfWe','W6FdMKPuW4O','nCkMtXm','AgRdKSk7sG','tIS6','zSkpimk9jq','WRlcJ19RcG','ySkao8kC','twzTW6ZdKmoWWPfL','Bh58W7ZdJG','WQSTbSkIc1PJyCkk','W47dPw06hZ/dOG','c8kzyY18','pmkLW7GJW6e','s2XcWQSIWOy','W6a4A2RdQmkjva','cCkeWOOvW4ddRSojzG','cSkgArFcLW','WOaDDrpcMW','dCkfW4GoW6C','W6BdT2y4W4xdUSknW7WcpG','WP3dP2KNrW','W587ma','D8kgaCoNW5y','WPxcJ8o0Cmku','p8kEFrHC','a8osW5lcJMzMdJvooa','WPVdH8oasue','W4tcT18NfIxcLmkxWRWL','WQpdPdhcHmod','WPpdGCoKtLO','WO0gAvxdLmkZk1tcTZi','WORcImoLf17dMgBcJmkNW5G','WOVcKIVdLSoeuuPGWR3dOG','mSktWOOxW50','W7BdRgyLWRhcOSoiWQWKaW','W4VdH10WbG','p8kZW7elW6C6CgZdHG','WQ9RW6/dS0e','zSk3WPpdKaj0ymkmWRXJ','W7VcSv0Bga','tMLsWPK','ACkYWOG','W7pdGSoNWPpcUW','vgSBqWm','WPVdUM1lC8ktWPe','WOymhCk7jW','A00Bxq','W5ulqtvnsCk
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