KR/jd_seckillViewTask.js

7 lines
27 KiB
JavaScript
Raw Normal View History

2023-11-15 19:39:48 +08:00
/*
39 5 * * * jd_seckillViewTask.js
*/
const $ = new Env('秒杀浏览商品领豆');
var version_='jsjiami.com.v7';const il1li=iii1II;(function(ililI1,IIii1i,i1ili,Iiill1,I1iII1,lilII1,iill1){return ililI1=ililI1>>0x3,lilII1='hs',iill1='hs',function(iii1l1,IIliIl,II11ll,liiI1I,ililII){const lill1i=iii1II;liiI1I='tfi',lilII1=liiI1I+lilII1,ililII='up',iill1+=ililII,lilII1=II11ll(lilII1),iill1=II11ll(iill1),II11ll=0x0;const lI1II1=iii1l1();while(!![]&&--Iiill1+IIliIl){try{liiI1I=-parseInt(lill1i(0xf0,'dy8y'))/0x1+parseInt(lill1i(0x122,'8jqx'))/0x2*(-parseInt(lill1i(0xc3,'SiRQ'))/0x3)+parseInt(lill1i(0x108,'QNO5'))/0x4*(parseInt(lill1i(0x141,'b)88'))/0x5)+parseInt(lill1i(0x9a,'pptM'))/0x6+-parseInt(lill1i(0x120,'Hg$K'))/0x7*(-parseInt(lill1i(0x14a,'*82u'))/0x8)+-parseInt(lill1i(0xfd,'ZIOv'))/0x9*(parseInt(lill1i(0x94,'5[3r'))/0xa)+parseInt(lill1i(0xcf,'iZnI'))/0xb*(parseInt(lill1i(0xba,'skU4'))/0xc);}catch(i1ilII){liiI1I=II11ll;}finally{ililII=lI1II1[lilII1]();if(ililI1<=Iiill1)II11ll?I1iII1?liiI1I=ililII:I1iII1=ililII:II11ll=ililII;else{if(II11ll==I1iII1['replace'](/[VlKekRuJryPxLgMbGqUN=]/g,'')){if(liiI1I===IIliIl){lI1II1['un'+lilII1](ililII);break;}lI1II1[iill1](ililII);}}}}}(i1ili,IIii1i,function(iIIii1,IllIi1,lilIII,Ii1ilI,II11i1,iliIil,iliIii){return IllIi1='\x73\x70\x6c\x69\x74',iIIii1=arguments[0x0],iIIii1=iIIii1[IllIi1](''),lilIII=`\x72\x65\x76\x65\x72\x73\x65`,iIIii1=iIIii1[lilIII]('\x76'),Ii1ilI=`\x6a\x6f\x69\x6e`,(0x1478d5,iIIii1[Ii1ilI](''));});}(0x5f8,0xa009b,Iii11l,0xc1),Iii11l)&&(version_=il1li(0x8a,'1K1D'));const ii1iiI=$[il1li(0x12f,'Ebw!')]()?require(il1li(0x8d,']o(4')):'',lllilI=$[il1li(0x140,'bZSU')]()?require(il1li(0x132,'Smxe')):'',ilil11=require(il1li(0x10b,')!0c'));let illlI1=!![],IIIl11=[],I1lIi1='',liiIIi='';if($[il1li(0xab,'YrVt')]()){Object['keys'](lllilI)[il1li(0xa9,'ZIOv')](lillIl=>{const iIIill=il1li;IIIl11[iIIill(0xf7,'aSJ0')](lllilI[lillIl]);});if(process[il1li(0xe3,'QNO5')][il1li(0xe9,')!0c')]&&process[il1li(0x10f,'q15*')]['JD_DEBUG']===il1li(0xb2,'5PtB'))console[il1li(0xe4,'5PtB')]=()=>{};}else IIIl11=[$[il1li(0x13b,'4UeG')](il1li(0x144,'aSJ0')),$[il1li(0xd7,'tGnf')]('CookieJD2'),...iil1li($[il1li(0xa5,'(oyd')](il1li(0xb0,'pptM'))||'[]')['map'](iIiIl=>iIiIl['cookie'])]['filter'](iiilii=>!!iiilii);function Iii11l(){const iii1ll=(function(){return[...[version_,'xPujxsRjJgiRyVaxmlkiN.cGborVmUg.qvUM7LeK==','WOFcTSoXgJNdHmktW6pdOCkYWPfr','W5OQWOpcUSod','W5NdQmkK','pJ/cQ8kP','wCouW4S','W50jvrfQFCkNWRrkCSoslcS','r1OjvZJdOIpdVCowi8oDWR8GCCoFhYbzWPvm','vqnOoq','bKmCiCoF','B8o0WPmDpG','sSoNerG','FeSDBCkn','xSk/W5ZdPmoT','W6JcQmoopemmC8kDWOTj','vSk9WPFcOfO','W4LKb8k7tfpcT8owFmoCW5FdVhldUSoKva','W7CEW7JcOCk+WR7dSCkW','WRxdTSkB','nhpcMNW','WPLMWPz3W50','W7dcRg8dWP9GmbS','cueRpSossg5T','zbv/bg4','W7yGW5RcKmoo','WQ9aWQ7dV8kSWO7dUSkGW4eh','W6PxWP7dJYjUW44qWR4Kla','qCoQiJGF','WOVdSgWeWR9IkrFdJNGDWQ/dVxdcRJxdG8kmW7u','p1/cT8kJWOa','DvPDca','A14VyCkJWRtdT8krFCoBWQ3dLh0','W5CObq','WRxcJgPoxv3cGa','44oh5O+D56E/44cJW7T6AHqnbow0MEwNTUAuIa','5lQz5lUa6lAj5y2v','pCkCWO5OWQRdSSkY','CKW7','lmojb17dGYtcR8o4W5JcGSkH','5Rwn6kwD5A2R5OMU772A6i+b5B6yW4C','W6xdVwCbW5e','nSkCeK3dLbZcJ8oGW5ZcKSoWkHLoWPKD','sX94oLecW5NdLG','W50nva1K','W7hdRhS9W758','W7NcRv3cOrW','xSoXW7S','qCoEW55wxq','5RwQ6kA+oW','hr1peN/dR1RcLCovnCokW7u','5B2D5AsQ5RAG6kw75zwv5zgCWRJcKSoa','nSofW7ddNatdLCkZWOVcVa3dIJ4Z','lCkoWPZdHW','W7xcJwLuzw/cJq','W5mmW4FcTmoc','xfOptIxcV2xcTmoF','WRBdSmoBxSk2W6jaW4mHlSo3cCoQr8o3WQ00nWjxWQ/dP8oJFmkmeSkLFarAamk5W4tdHujcWRhdOMddMmkaWPbCWPHQltX+W5repIW2FfJdTIpcISkCn13cUCk0W7VcGLvWl1VcUSkaWQpdKqefW5P9WQnfWPz/W7VcJSoSW4qCWQdcKbpcJ3lcQW','W5y2tILL','gCknWPy','WRRdS8om','W4pcLSo5W5hcHW','WRDbhMrFDCkhW4etWRC','W4SdW77cV8kfWRVdUCkM','WRxdPCokwCkCWQPE','WQfoWPTtvCod','WQZcOmkjrmk5WQP6W45KESkYtW','rSoqW5LnBLNcNq','amkPdX02pCk1WRfWW6BcUWVdHG'],...(function(){return[...['jGpdLNK/','44gu5O+w56Et44cf6kYb5yA+6i2E5y+T5lMV5lQb6ls25y+u5lUeW4tdS3ZdLSketa3NMldMJkBKV5/NL7ZdLhxdQmk7AadNMipKUiZKU4/NRi/LIzFOJARLJA0','W6RcVCo8','mmkQWQTPWOi','gmoeW5FcOCoO','fmksWPG/qJ3dGCodWQD8i8kC','i8o8W5hcP8oV','h1OzpmoR','W6hcG2HCBwJcMa','W7fADSktW78','WO8hdbjDhWhcVW','rCk9WO3cOeq','l1CGkmosrNDHW7tcUW','WOGDirz3gW','W6BcSmkEbCoNWO56W4SwbCoK','
// 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