mirror of https://github.com/6dylan6/jdpro.git
6 lines
94 KiB
JavaScript
6 lines
94 KiB
JavaScript
|
/*
|
||
|
39 0,5 * * * jd_seckillViewTask.js
|
||
|
*/
|
||
|
const $ = new Env('秒杀浏览商品领豆');
|
||
|
const bdy_0x1631e4=bdy_0x5b30;(function(_0x4e4bce,_0x168aef){const bdy_0x492444={_0x52df76:'0x28e',_0x51cb08:'@UMf',_0x26ebbc:'0x1b8',_0x337615:'1HRi',_0x226a84:'0x2e5',_0x23d8da:'A1h4',_0x76a319:'0x337',_0x4e85f7:'kYWP',_0x1b9aeb:'0x289',_0x4914ee:'v^#P',_0x27ff81:'0x2dd',_0x4beff2:'JPNX',_0x2e3254:'0x2ab',_0xfbe12a:'ioWW',_0x427e43:'0x3d7',_0x3837e8:'0x1ad',_0x4507a2:'cYF(',_0x332c04:'0x2d1',_0x58414e:'RD8i',_0x900a1b:'0x2b1',_0x2675ec:'9djU',_0x4ed263:'0x3ba',_0x42d49a:'ubh)'},_0x299185=bdy_0x5b30,_0x844ac9=_0x4e4bce();while(!![]){try{const _0x3f43fd=parseInt(_0x299185(bdy_0x492444._0x52df76,bdy_0x492444._0x51cb08))/(0x3c2*0x1+-0x19a6+-0x15e5*-0x1)*(-parseInt(_0x299185(bdy_0x492444._0x26ebbc,bdy_0x492444._0x337615))/(0x9*-0xfc+-0x19c5+-0x22a3*-0x1))+parseInt(_0x299185(bdy_0x492444._0x226a84,bdy_0x492444._0x23d8da))/(0x1e*0x37+0xda7+-0x1416)+-parseInt(_0x299185(bdy_0x492444._0x76a319,bdy_0x492444._0x4e85f7))/(0x1ef4+0x37*0x79+0x5*-0xb63)+-parseInt(_0x299185(bdy_0x492444._0x1b9aeb,bdy_0x492444._0x4914ee))/(-0x1f61+0x1e94+0xd2)*(-parseInt(_0x299185(bdy_0x492444._0x27ff81,bdy_0x492444._0x4beff2))/(-0x46*0x70+-0x430+0x22d6))+parseInt(_0x299185(bdy_0x492444._0x2e3254,bdy_0x492444._0xfbe12a))/(-0xbfb+-0x1*-0x359+-0x8a9*-0x1)*(-parseInt(_0x299185(bdy_0x492444._0x427e43,bdy_0x492444._0x337615))/(-0x7*0x52f+0x1842+-0x1*-0xc0f))+-parseInt(_0x299185(bdy_0x492444._0x3837e8,bdy_0x492444._0x4507a2))/(-0x5*0x241+-0x5*-0x4e5+-0xd2b)*(parseInt(_0x299185(bdy_0x492444._0x332c04,bdy_0x492444._0x58414e))/(0x164a+0xdcf+-0x240f))+-parseInt(_0x299185(bdy_0x492444._0x900a1b,bdy_0x492444._0x2675ec))/(-0x1361+-0x287*-0xf+-0x127d)*(-parseInt(_0x299185(bdy_0x492444._0x4ed263,bdy_0x492444._0x42d49a))/(0x1557+-0xd85+-0x3e3*0x2));if(_0x3f43fd===_0x168aef)break;else _0x844ac9['push'](_0x844ac9['shift']());}catch(_0x1a9a39){_0x844ac9['push'](_0x844ac9['shift']());}}}(bdy_0x4ec2,-0x39e68+0x332a*0x4+0x8eee9));function bdy_0x4ec2(){const _0x1f7106=['WQldTxHHWOm','pxJcGMCuWObWWPNdSsnhka','WR/cLrz7WOe','imoUW4FcJL4','mr5acWu','imoAW4RcUf8','6kYW5yQm6zUx5OAz5z2HW78mqSoHqUI9KUwfLoAJT+s+KUAxQ+wfLUwUQCkl5BQE6kY06yk36lYu6iwu5P6C5y2H6iYI5yYfpSkjW5FdTmo1W7C','W60aW5xcHrm','rYD2uW','jmkCW4O','rX7cUHtcH3FdM8k6ha','5lMj5PsO5Bwn5A2X5OQG5RwB6kwO772Q77+X776J','WP81oImd','WR8mbSowdCkmWO8EsCoxje7dVLVdT0hdLd3cISo+sJ7cI8k6qSkHq2JdPCoxWPNcTmk+W5xdIfLaW63cN3BcVeVcHSkcWRddTYddNwxcRSkWW6udemoLW4JdOCo8WPRdJtzyW4ldTcNcHKRcO8oTsSkjW49mW7VdMmkYexddLfBdI2THtSkKjCkMW55eW75BW5igWRRcJNNdUh/dQsNdKmo6gK7dHSoNcfugWPzlWPz6qYHce33dNCkBxKJcRSokB8kfCSo7nSoPWRWva2L5W7ddG8k2A8oJo8okkMJcSqytW4VcGNmwDCoPmCk6W6ldGuTWtCkqWPCQWOz7iddcJ8oYWROcf8oPW4BcGbqhWOTwzJlcOCk2WPRdJtCGWRJcIMHPc8oNm8k4WRtcTJ94DCk5WRddNmovW6BcVSo5WPtcJ8kbkZWpECkXWPS2BG','yCotW7mbW4dcKhu','wa/cPHRcNxG','WQtcH8oEndRcSwjWdG','W6qnWPhdPmkY','WR0BfCo0la','oSoRALldKa','yCkqW4lcUmkhjdFdKsWFWPK','WOu3W7pdVJK','WRlcU8o0dqZcLw9XCSot','WQOApmoQpmk/WQHhBSoQiKNdK13dTW','W7RcN8owWPxdPG','WOBcUGD/WQK','bmoKW7y8qq','yeJdOmkrdq','FCouWQWhW6/dN2DvW6FcI8koqSk/s8o0WP0lW6ZdKhNdMZ/dNmk6ArDkd3VdNHtcGwiiWR/dHZ7dHmkuWPBdUCkNmCoVW58DW5y','W5lcMGlcG8or','WQuxiSocaW','WQ3dSN4','W4hdRSo4dghdOtBcRI7cRSkyW7mRFemOWOpdUcNdN2i','W5qJWQS','W6NdV8o4','taTwBdFcNaj5ALKnWRy+','WRNORRhPHjlMLjRNMOFLViBOJAlLJlujuxVdSCofW5JcLSk0taT5l8o6hf5ahNq7W4m3WONcRSk/EIGLnKtcKdLQW5tcGSkQW5mdWRKTnuFdVhvN','W7zMxWigECkF','EdqaamkT','e8osvMNdQq','AqVdRa','W7dcUmop','WQ0Ml8oHpW','W7BdKutcStu','FXtdQx8R','W4/dTSoQnLK','FrRdQMRcKCoh','WOdcU8ozjJe','qxJdISk3oa','uqZPOkRPGitVVl7dKh7cHmoejqP1hSkMemkQF2OLWPZdK0RcPY8mFSoaDHe','WQRcOmkFna','WOJcTspcV8o2WRDSWRf1','WRbzA3tcRd8','WRmCc8oIo8oudv0','WR7cGcvSWR0','xCo0ymkycG','WPddMtqkqW','xHFdSLxcSG','yIFdSbbx','zmotW683W5xcGwHEWQJcLCob','WQ5aEfNcHa','W71SsWGxBSkE','pSoTW6/cHwFcT8ot','W4ldKx3cVJi','WQhcOGBcPCok','csdcJmoOWQa8W4bfW70','tX/dLdTh','W6NcTe8hWR/cJW/cLa','WOlcNmkCe14','W719xHWbjSocWPuKk8kLFmkJkwrABLlcNG8vD8oplXqAiCkLxcDLWRrfxcfryCoWt2ZdNCoiWQVdVCoprmkQCuhcVYNdUhBcN8kKemkUW5lcScFdNIFcUdLdjxPEWR5SWOa','W61hjmokmCkMWRHb','WOhdKt4CEW','W5tcMCkqrG','rcnSuW','ASotWQiDW6aTW7SR','WR05W6NdRHW','wY/dIKlcSG','W75MsW','nHtdOtldOa','W7xcLCkV','t8o6BSk
|
||
|
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
|