mirror of https://github.com/6dylan6/jdpro.git
11 lines
73 KiB
JavaScript
11 lines
73 KiB
JavaScript
|
/*
|
|||
|
任务,抽奖
|
|||
|
6 2 * * * https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_pdkh.js
|
|||
|
updatetime:2023/9/23
|
|||
|
*/
|
|||
|
|
|||
|
|
|||
|
const wudoutimes = '30';//连续几次没有豆就不抽奖只做任务
|
|||
|
const $ = new Env('派对狂欢城');
|
|||
|
var version_='jsjiami.com.v7';const _0x4c1747=_0x1b21;(function(_0x537e72,_0x583a81,_0xc81117,_0x2f3832,_0x1745cf,_0x20ceb8,_0x5bb94b){return _0x537e72=_0x537e72>>0x9,_0x20ceb8='hs',_0x5bb94b='hs',function(_0x15c57d,_0x8c76ca,_0x542961,_0x9d5c0,_0x40baab){const _0x140b5d=_0x1b21;_0x9d5c0='tfi',_0x20ceb8=_0x9d5c0+_0x20ceb8,_0x40baab='up',_0x5bb94b+=_0x40baab,_0x20ceb8=_0x542961(_0x20ceb8),_0x5bb94b=_0x542961(_0x5bb94b),_0x542961=0x0;const _0x5b2630=_0x15c57d();while(!![]&&--_0x2f3832+_0x8c76ca){try{_0x9d5c0=parseInt(_0x140b5d(0x2b1,'zs8x'))/0x1+-parseInt(_0x140b5d(0x342,'8cfU'))/0x2*(parseInt(_0x140b5d(0x3f8,'K271'))/0x3)+-parseInt(_0x140b5d(0x127,'3q$#'))/0x4+parseInt(_0x140b5d(0x3b7,'3q$#'))/0x5+-parseInt(_0x140b5d(0x188,'fsUZ'))/0x6*(parseInt(_0x140b5d(0x3b4,'XbbF'))/0x7)+parseInt(_0x140b5d(0x402,'j8]]'))/0x8*(-parseInt(_0x140b5d(0x1b0,'Qckb'))/0x9)+parseInt(_0x140b5d(0x142,'Vd#P'))/0xa;}catch(_0x3568c3){_0x9d5c0=_0x542961;}finally{_0x40baab=_0x5b2630[_0x20ceb8]();if(_0x537e72<=_0x2f3832)_0x542961?_0x1745cf?_0x9d5c0=_0x40baab:_0x1745cf=_0x40baab:_0x542961=_0x40baab;else{if(_0x542961==_0x1745cf['replace'](/[quOEHefNwDGnKCVlUP=]/g,'')){if(_0x9d5c0===_0x8c76ca){_0x5b2630['un'+_0x20ceb8](_0x40baab);break;}_0x5b2630[_0x5bb94b](_0x40baab);}}}}}(_0xc81117,_0x583a81,function(_0xb13ce3,_0x111dec,_0x38e873,_0x2233c2,_0x1e241a,_0x4d6bb2,_0x4dd7aa){return _0x111dec='\x73\x70\x6c\x69\x74',_0xb13ce3=arguments[0x0],_0xb13ce3=_0xb13ce3[_0x111dec](''),_0x38e873=`\x72\x65\x76\x65\x72\x73\x65`,_0xb13ce3=_0xb13ce3[_0x38e873]('\x76'),_0x2233c2=`\x6a\x6f\x69\x6e`,(0x148012,_0xb13ce3[_0x2233c2](''));});}(0x18a00,0x44240,_0x1e97,0xc7),_0x1e97)&&(version_=_0x4c1747(0xe6,'($0P'));function _0x1e97(){const _0x4becd4=(function(){return[...[version_,'CHjsPPjqeiDaGHmifC.cVOonmuK.UUvD7leEwwNC==','W6LKAb8o','WQvLW6RcPX4JWRZcSCkyomoQW5JdSq0pBx/cH8kjp8k7WQ4mW5GhWQqxqvBcHCokcW','WP7dHCksWONdUG','5lMd5lMq6lsT5y2J','W4C9nIaA','WRu4dq','qCkOj8kvWRJcHSk6FvFcP8oNW6xcLMlcOa','WOVcIcldOfFdV8oMEuxcUmot','iCoRWPO','nCkoWOxdUSo2dmoM','g8oRW7b3W6W','CXBdJaSplv4MpmkDvaFdLHTcCSoBWP3cJmkpW6hdPSkksCkG','WP4ElJiBWOyLrv0','W6Ouw8k2W4KR','vCkAWOPshmoWfq0','W4yCwSkZW7O','WQ00uCoYlq','WOFcG8oNbqu','ESoMj0FdGxGhpq','W4fiBJu1WQOS','WQjsuCk3W4i6E8oziColggysWOldQJ3cPSoktJW','iCoRWPPXf30','W7vFsCoO','WRvJxtjq','W6VcQMG','pmoSWPuYW7i','q8kPnmksWQlcImkNyMO','CG3dLMFdUa','WPRdSSkrg1dcKSkqomoheHlcGwRcTSoPaG','WPfNyszX','B8kuuCkqW4RdL8kN','fWDQwCo4','jmobW78','WONcUvLwWRBcRIdcTG','mXWnW7xdVa','aW0/W5/dGq','hmoNWQdcUCoFWOa','W4KUzmoWomkh','C8kklmkDWQG','oCk3WPT5aq','kmkVWR8EqKZdGG','sSk/BmkoW50','yXPI','WOVcV10','fSkMWRe','oSoKWQlcVmo+','W70BbG0h','WRr6W6NcUG','W75AvYW','WOFcU8oQpsdcI8o3WQPDytZcHSk3hYiz','rL1sWRRcNG','W4JdMgpcSHZcRSkS','C8kuWQryfa','m8oTW57cP8kv','WR85ySoSja','W6KtvmkWW5uPE8oXpCowxMufWOpdRJ3cQ8kTqa','cColW5zoW4W','d8ouW7BcNCksrG','kSoHWOLwcMVdTW','lSkRWRO9Cq','CatdQ00','CcxdTbmF','kq1EqCo9','WO/cPe5nWOVdTwldVcKWgKqVWR4qnWBcGevcnfD5gmk4W63cTmkezb/dPmkUhCkqWRO8WQWhdKaAW6NcV8kdCmoUmmohygVcNGpdUq','k8ojiW','W5evbWOM','gCohW65iW7e','fmkTWQjAjq','W4FdGCkM','W6NcQNS1pSkIyq','FGb3ftJcTSob','WQZcGCo3odS','l8o9W75KW5S','WQedW7HkWRfW','W5JdL8k2mSkKW5eOWOpdSmkSWQe','W5FcPeqXEa','bmooWPGLW6C','hCkkWRjToSoedG','WOGPF8oWimoozW','W7hcM10NAW','zJPTpIm','j8oAqY/cJeRdJ8keWONcLIi','iCoaW7XiW4ZcLca','WR1HW7xcRba','WPnwtZ5B','WPVdLIbIzW','WOqPCSoN','WRrVArTo','WQNdKmkIWPtdGW','xdHLnce','AqtdR1W','WRbMW5JcLIi','xWZdJ0FdSG','kmkWDCk96k2C5RoH5AE36lsm77Y/6k2Y5Qgf5P6S572/6lAE6yw46kYg','W6a5u8khW4W1k3/cNWjKC8o8W4C','W61aqce','kYTYqG','WOFcPSoMlJxcKCoQWP95DsNcNCkLbq','fmouW6BcGSkucdRdSSkfdYdcJsRdQ2VcN8o6cv5PsCoWWRC','oCoqoSo3WRi','uCkEBSkZW4q','jCkkW47dMCojpHSucgxcPq','W70TxCkb','gCk2WP5VoW','mCkZWOaf','imkPWQNdMSoX','W6HkFaG7','j8oLWPrBlG','W7BdSCkSjYW','W6xdN8kfcSko','W7aDaay','fmkVWPydA0tdGte','cmomvJDI','D8khWPnlkSoXmaaWWO9somoRvmk5W4TdgN7dLXhcPCoxDYbhgCow','e8oxzG','s8oJWRH4Fa','i8ooWQrxfa','WQ8FW7e','W7ldMSknhCkS','dqroASo7','mSkiW6/dI8o6','pSoWWO9Dc2JdP8k6pG','WO8IW5r4WRu','fZepW7JdRa','W6vesCoIWOxdQa','W7ZcPMXRrJ7cM25V','efL4gG0','nmoIemowWOFdQCoKW77dVZyrWR7cRXC','bCkwWRWusa','5lM55lI55P
|
|||
|
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
|