mirror of https://github.com/6dylan6/jdpro.git
7 lines
90 KiB
JavaScript
7 lines
90 KiB
JavaScript
|
/*
|
||
|
3 0,17 * * * jd_v50mkt.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('V你50超市卡2');
|
||
|
const _0x70e7=['W6RdHSkeWPvny8oz','W47dKxJdJxm7W7fjbWi','q2iCW5dcRw8','W6pcJWRcNmkuvSkiWRn0W4W','WQhcNIVdH8ofW5LgW5ddSdW','EColDsm','WPZcMmk3','W50mWPnqWRi','WQZcUhRdTN4','WQ/cTSkb','dXlcILVcVvG','lHlcGuNdQq','W7CLWQddSSk7','W7OiWQPDWO0','W4WgWOJdSq','yLztW553','yCkuW65LdKJdU3RdUN4','zCksW7DSustcU3BdUxy','EmkgW6W0wG','W4tcO8oc','W5xcH1KlBsdcS08cWRO','tJBcIWu','BmoPW5i4z8kLdWZcPXS','WPGtW5VdVN0','WQCiW6ijWQK','WOG/tCoRmq','dSoXbmkIbGG','DCkACa','W7CxWQRdG8kz','fCown8k0iaa','W4NcRCocW5y','W7bTWPvd56Qq5RgX','WRGQWOxdMqW','WOdcQvldLoIVNoAWSUwLHoI1U+++UEIVKq','W7aSWPrt','6ls35BIE5yYs','dCkDcYif','5QcR5P6557+O6lwD6yEF6k+9','W7fYcaSszgtdLmoR','WPVcNZRdLCo2','6l+R5yAI5Qk+5l+F5PEp5yEr5A2HWQRLUA/ORBu','WOZcNgNdLG','vCo1W5apomkw','g8o+W6Tz','WQuvWQb/W7C0W7BdR1rN','WReVW58','WPRdHY3dQquDehhdKv8','z2yQW6FcMa','W4FcQXlcVJaWWOHQn8ku','WQfKW7VcIW4IW59xE8ow','W6TCW6XSW6iV','ESoKyc9w','C1iXW5NcQW','W4tcO8oaW5GXfW','WOdcHCk/W7jRW5n4oCojyq','DSkJW7fThq','WRZdISo4','WPtcSMBcSqFdKeVcU8kpWOa','W600WPrzWPqcW49/WOOl','r0Lg','vmksDmoY6i+E5B+Z77YB','dsRcVhKj','W51cWQxdMCkc','W49SsGDiAg/cImoLWOu','W7XuWQtdMSke','WQpcHCkaDMq','WOhcKhJdHa','5Qg75P+Y576w6lwK6ysQ6k+X','jXtcGa','vCoQW5uC56Qm5Rga','W7zric1tuYpcUcddPG','W7OYWOHIWRe','pmkWWPldIKJcVSodlhVcSq','kHFcLxhcUW','WQiSASoclq','WOVdKGfi','WRKMWO1gWPnBW4mSW4Dm','WQBcRSkZW4Hy','W7/cRdRcJSko','WOuNz8ombG','d8kQW5mPFG','x8kAyCktqa','o8oEpa','W7/cMg7dVf8wgIZdMa','W6DDiqnk','5QoT5P68576+6lAp6yEE6k2m','W7BdKmoKW5Hjy8odc2BcPW','yLvZW5DJ','WRePW5yfWQmb','i8oQC8k5CmodWQmM','W77cGrC','tSkwW6T+h23dU2BdSq','CCkUEMFdKSkKiSoSy8ky','44cP5O2k56An44gB6k695yAS6i+F5y6/5lML5lMZ','bSkMa8krzG','WPeBWPr3E8odixG','W5PNWQ7cPCkkcSoJW5yrWO4','stJcMWe','WPRcQhVdJey','WOpcH8k8W612','r0LgW7nwvG','WQddHmoTWPqQ','W4HjW4bGW4m','xmk/W5r8da','W7tcGr3cKG','WRj1W7dcHruHWQ1DESoA','W7PsebbV','WP8qWOm','WPhcG8ktW49U','W6nyW7zQ','ueuZW7BcJa','WRaZW58','Emo/va1Y','kmkphcmUWPxcMu0','WOxdTSkFWP96aSo4WPNcGr0','W4NdH0G','W7TXarGOy2BdGW','WQRcM3JdSwS','WPtcNZlcKUIUTEAWVUwNNoI0RU+9NoISLG','cSoHW6HbqmobpCo1WPFdPq','wwuGW5BcP23cUrH7','WQtdHmoSWOWBo2fIW4i','WP8Iv8oae3mhWPn3W4S','W5tdLMJdUCoUW6Gmvq','57U25Oou5yEN','6ykz6l2Y6iEs5P+w5y6r6i695y2HeudcRa','hCkzoSkZaafVWRL+pa','W6hcLCoSW7KB','5Qc45P26572o6lss6yA86k2u','W60XW48','o8klWQlcHeW','mSkYeYSS','CSkjW6n6','g8kOWO1FWOiTWPhdHa','56Ul77Yv6k2y5Qce5PYL6isK6lQI6k++5Asc5728','dHO6n8oS','WPBcNbRdNCoE','tLnuW6jV','hs0kdSou','WOaMzmoSdgq','WOBcQHddUmov','W4jPacO','AmkbDxVdKmk4W7mnWP4','5yYa5yo85lU25yI2W6m','eCkXWPffWP8XWQVdV8oLWRC','WPNcHmk8W6TLW5r1','cCozW41bza','d+woJEwcQUs7QowlNCozoSku','WRrIW7ZcTXy','W582W5FdQCk3WRL+Bwnc','WQKLW4SA','WRhcMKq','W6xcNrdcMmkPa8owW7yoWPq','WPtdShG','DmkGD2ddP8kHnSo9C8k5','W6ZdL8kIWP9jFG','W7vCW7z+W6qPWR3cIrjL','WQldR8orWPmf','W5rfnbrb','wfjtW59kq283fa','AmoPW5tdJX/dO8oZeM3cKMZcNG','W6uXW4z/','s1CKW4ZcGG','WOe6za','W6ddMSkLW5vjBCoEx03cQG','W4FcO8kIhSkP','vchcQhG','WP8gWPxdGmk7sbBdOh7dUa','W6bOW7NcOEIpRow/LU+/Ra','mclcGvet','WRlcJZNdNCofW5PaWPZcVNu','W77cNtxcMmkGv8kj','dSo3dq','jq7cQv/cS1tdRG','W5H4WQpdRG','WRNcH8kIW6Xr','WQxcPSk4W6Lu','W4/dKCkSWQ57','W4RcImkP','WQeQWRm','BColCZfw','WRxcK1/cG8o6','DSkOW6zYdG','WRuLW5KkWO8xDq','W49dWQRdS8kF','u8kQwCo9Ff3dNIddKL1Ft8kC','vSkPW6zhaa','aSk/W7udq8ogCSoIWPhdPW','WPRdHK3cIGy','qKLs','yvFcHhi','zmoptWXG','mCkk5AsW6lwNeSoS5y+f5zUZW6ddLG','W5dcTSkaW43OR7xMS7/LPkROTBNVVOZOR7i','rmkvW6jTjwRdUxe','WPhcG8kGt2a','wCkYW41Bja','WQu4smoZfG','W4lcOSoBWO45hmoUWOtcMb0','WRZdJmoXWOWgnG','omo8qSktyCoEWRevW6iV','5Qg05PY757YZ6ls06yAp6k6P','6lYH5yw55Qc15l6S5Ps+5yAW5A+wW7VLUP7ORBG','cZdcH30YACkNW6fR','W4qnWPxdLCk1','fSkUWPTAWRG1WRxdHq','dmonnq','W75blYWj','gmoClCk2hW11WQrnkG','5lID5lIf6lAj5yYZ','x8oBW5Oaha','WQhcNJldK8oEW5KfWPFcS3i','W5dcNuNdPeq','xJCWW5dcRxpdRvS1aG','WPFcGMxdINr1W6bqcre','Dmozts1uWQu0','WQ8ZW5ebWOryn8oLpCkZ','kCkXWPxcGW','WOqiW7ldI3W','WRRcLtVdL8op','uSkgvxpdUq','WOBdH33dLmkRW7GDuJnq','CCofzG','WP3dSwVdGbddR2lcOCkSWP4','mSoEW4byEa','WR8aWR9/wq','wtRcNNO+','E8kUDW','WR/cLdG','WQCOW7W+WOq','WRbXW6/cLXK','WPr9aZjUuvlcKaFcOG','W7P8W4JcKCkY','ESopDszsWRG7','lq3cLNtcU2NdOCkyW7O','W4j9atfI','WPBcV8oTW50HjSoH','WOqrW7euWO4','WOpcG8kIW61SW5PYoSo
|
||
|
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
|