mirror of https://github.com/6dylan6/jdpro.git
7 lines
36 KiB
JavaScript
7 lines
36 KiB
JavaScript
|
/*
|
||
|
39 5 * * * jd_seckillViewTask.js
|
||
|
*/
|
||
|
const $ = new Env('秒杀浏览商品领豆');
|
||
|
var version_='jsjiami.com.v7';const _0x41663f=_0x8d27;function _0x43bd(){const _0x2c010d=(function(){return[...[version_,'hjVgtsxjTlOiSaumuDiCWK.tcgyQom.pqrvdVV7D==','WQ0bqCoJjYlcH8kzoYjoWQpcOCk1fmkZW5Oww8kWz1RdH8kzeKlcLXxcG8o2AhdcImkDWQWkkmoBWRVdSgpdNeRcRSo+lZaqW7VcJ2K','hbxcVg4f','W7pdUwVdTu4','WPWpWOq','WOdcHWhcPh4','drBdI8kYW5aXW4RcGuW','n8kDW40QWPJcKSkzW5VdLb/cM09AW4BdUCoiWRFdJSk0nfu6nmobimkSvtDECSkYWQhdM8kCWQfxhKWqWRyqBmoP','nSkEW6Smsq','WO7dISkjWOVcOG','mraKmxG','WQPUc1u3','WRldMmk4WRZcRq','WPWTaNxdKa','FKqA','W7GWFrq','WQGWcq','qmo5kmogW4G','A8oKFtJdVq','mJlcHLu7WP4','mae0','k8kIBSospa','WQ/cGCo3','tuJdLsbS','W5xdNepdVviIEapdVs4','W6m0w8o8WQPHq0XFjaqDW77cOwmhdXhdRmoqCmoDkq5IWPlcICkRshtdN8oSlSouf8kzbSkgWRCGlc7cRq','pW7dImkdW4C','uCk4h0zR','WRekWPXKaG','WPOEeG','W7ONBYzN','WOlcJbuNW6RdKvHsWOxdPmkOWOyXtmomlJxcSCoUW43cTCoRAxlcICoAWOzpkG7cHSk5WQC','WPvrdG','WO7cRSoq','iqhcM8oAza','WP3dQLtdINpdGSoq','WQ/cJ8o+','W5H5Cf3cSa','W5NcUCkpW6PB','WORcHra','eaVdMSkWW7a3W47cGG','xWRdLfZORi3MS6lLPlxOTkpVVOlORBVMOidMNlZNVjdOTjhPHBZORzq','W4ZcPfHuxqyVWRBdMqaiW5C','W6nHmfi0W5ZcNa','WRRdGmknpSoAW5O','lmoiWPmGW4y','WR/cGb/cG0K','pLPKmZG','W5XzW7S','eGFcGuS0','FSo8yd7dOsa','WQiqxmoV','WPpcNrC4W6y','W4RdK8kWEmoc','zZ9Vztm','W5aHWRn+6k+e5Rc95AEf6lsh77+q6kYI5QgG5P+Z572E6lwX6ywA6k2K','WR/dNmkK','WRtcHIeyW4a','W61ClrOm','W6ddNmkDzaBcMqTXW6O6','WRT6lf4I','WQ7cGCogkSoPnSkuWPZdSCoL','WP7cVCocW4ldLa','WOP+W47dMmo9W4nqWRSy','D8ofqthdIW','ibTpWQldTdz/uCkelmkSW4iL','WOVcMCodebW','WRBcJWa5W43dK1rd','WRZdJfOFfq','WRDifh80','WP89WRbzoSoBrI/dR3JcNmoWw8orWRHfWPNdJ8kjW5lcMXvHW5yXWQ8YaIddOu7dRSothr58ErxdRbRdNti','WORdI2yYmq','5lIZ5lQU6lEr5y+O','WRWFc30uBCozEq','bZtcM2C8','mSkDW6OeEW','WPRcLmoYW5Dn','jSk3CmozmCoi','WPnncZhdRW','5Rsi6kAeW5y','WR8nWRnUEq','yCoNDq','WQfmhWxdIa','xbrT','yMZdMazKW44AWOmAzG3dKW','omkvW7SnumkiWQu','i2v4dJ4jwhaDWQTagCkBW4dcJmk4W6VcMqn4WQmeW5qRW7rhW7dcICkZWQ8hq0ZcRG','WRRcPSojW7m','WQJdJ30qmG','5lUb5Psd5BA/5A2z5OUg5RwG6kEG77Yc77Yo77+S','W6GVqCo/WQ0PgqbjlHC','W6DNiGqa','l8kCW4OY','WO7cRSoqiZRdQa','5lQb5PE05BE+5A+Y5OMD5Rw86kA/772E772977+A','xWyLkq','5B+F5AwU5RwF6kA05zs/5zgkW7Tsnq','nY3cHmoCEW','W6VdMSkCz0xdPszpW48zlmoj','WO7cPmozatZdSG','WQdcGCoCpbNcPbu','WPhcPmozaGBdTqBcMsi6','AdpcOeO0WPK2','W51xW6JdL1S','DSkblef/','WOdcPmowcaBdRX8','WOBcRSoCkbm','W50ExcfZ','WPVcRSoJdHe'],...(function(){return[...['W77dHCkwBCoGbmkvWQZdOmocwa','gZxcNhS5','lg/dQhpcTr0EBSk8y8oeW5S','W5NdSwddP0K','EuVdLcbP','kYpcKq','WOxcU8oYW79B','F8kVo8kgWOm','dSoVWOKzW7G','WPXIW4tdGCoAW4D3WPO','AIBcRtG','WQVdUmkIWQdcUG','WQdcGSoBW71x','zslcTtNdVa','W4jxW7ldKfWy','W7ORxSoBWOe','W5hdJfD7WRBcHqH+WP3dV8kaW6m4','WPvLbcBdGW','WOP+W47dMmo9W4nPWRvU','W7JdRe3dJ3O','DxNdG8kykLjeWQRcPZldJwe','l8kyW6Cyyq','v8kVlxraW5NcTJe','vY1IsJ0','W6tcHSoWzSkmWOCpWRT5EmkluW','WP7dP3ddGSk0WPHRAmklWPKzW74','fIxdOhdcGG','W5ygWPzzuaVcNu3cSSkCW4qRFmo7W7tdMGqwsqlcU8oWWPpdRHv2W551WOhdKG','W7BdN8kcC8o+','cJVdK8kMWRe','bgNdShtcIColuh/dVSoPW6ldO2hdJmkrW7W','WQT1hJRdGG','W5tdN0ldVHbFsYRdHtxcP1m','WPWSWR1A','WO7dICk7WRBcHG','W6zLfIWr','mr00','W7pdNCkq','W6ZdL8kwBCoNpW','raGR','u0DUlIFcNH1XtcOQW5q','lcRcVMKVkrtdJCoYW4hdV8keW6/dSfJcQsDMaSk6','6kY05yIr6zIF5OAr5zY0gmkXWOzWWRlOVzNLHlZMOOdKVOFML53LH6dLR5Hi5BII6k6N6yc66l+M6iAQ5P6r5y2r6i+Y5yY1ouepfmkAbG','WPOOWRq','CCoFW7Wmx8kyWOPVeLXcWOW','WRFcQmolW73dUmo65BEy5AwI5PAoWQqTuG','WRpcOSoqW7ldSmoRsW','W5DehH4r','y8ksoCkLWQuvbYX/WP/dNM45whWvys8xW4G','W45fxsvip8kHdCkxexHDk8kK','DcBcSI7dUW','WOxcKXCoW6ldKve','W7hdK8kAEG','kI3cGSomDG','WRG6WO9guq','E2u5W4hcLW','WQ1WW5xdKG','W6FcQSk4W6nX','FCo9yt8','W6aREHbngZ4Kg0lcGNJcNZ3dPSkHD8oUtK8TW5bHgmocW6/dGHC6oCo7W4q3rCoWeuaCWP3dKmkMW5/cOYxcM1pdNaiJDmolWRlcU3XIhhFdSmoHaCoTz8o9WPhdNCkDWRFcJNeMvq','W5nVsLNcLq','WQ7cNCo3','paiJj0y','W54ZsSo+WPC6aqy','W7VdK8kdFG','oaBcGgf1WQzkv8kLW6bAdCkPWRCoWRPadG','WPidaW','gGpdJCk6','WRtcJ8oD','WRNdHhWpha','kZVdU8kdW50','WQZcRIJcJweUrYW','W6BcPmkR','aYJcKfSA','44cu5O6x56E644gm6k2P5yw86i6c5y6r5lI75lMw6lEj5yYi5lU2W5RcRWlcICogWOvr55Uq5O+G5l+a55EmW6tdU8k9lSoMWQtNMyxKUiJKUO3NROVLIRNOJ5dLJBG','WPSMWQm','ACoNFdi','WR0HFmoJWPq3dW','nHpcVfWl','dqpdV8kxW78','ndJcHmogCaz0WO3cQG','WO7dVqufda','WPzdbbO','WOi
|
||
|
// prettier-ignore
|
||
|
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
|