jdpro/jd_car_100.js

13 lines
48 KiB
JavaScript
Raw Normal View History

2024-01-02 12:59:48 +00:00
/*
京东汽车概率100豆
cron "31 1 * * *" script-path=jd_superLeague.js, tag=京东汽车100豆
*/
const $ = new Env('京东汽车概率100豆')
var il='jsjiami.com.v7';const IIiiIl=iii1II;(function(I1lIIl,l1ilI1,l1l1Il,lil1I,l1l1Ii,IIIIlI,l1i11l){return I1lIIl=I1lIIl>>0x7,IIIIlI='hs',l1i11l='hs',function(liiil1,lllII,l11iII,l1i11i,l11iI1){const liiii1=iii1II;l1i11i='tfi',IIIIlI=l1i11i+IIIIlI,l11iI1='up',l1i11l+=l11iI1,IIIIlI=l11iII(IIIIlI),l1i11l=l11iII(l1i11l),l11iII=0x0;const IliiI=liiil1();while(!![]&&--lil1I+lllII){try{l1i11i=-parseInt(liiii1(0x16b,'x2Jp'))/0x1*(parseInt(liiii1(0x2d4,'0m2T'))/0x2)+parseInt(liiii1(0x192,'mER8'))/0x3*(-parseInt(liiii1(0x1be,'JjlT'))/0x4)+-parseInt(liiii1(0x2d5,'7P3F'))/0x5*(-parseInt(liiii1(0x20f,'9HF['))/0x6)+-parseInt(liiii1(0x2cc,'Fx&m'))/0x7*(parseInt(liiii1(0x139,'kK6P'))/0x8)+-parseInt(liiii1(0x1a6,'9HF['))/0x9+parseInt(liiii1(0x1c7,'f@TI'))/0xa+-parseInt(liiii1(0x2c0,'mx%7'))/0xb*(-parseInt(liiii1(0x26d,'9KFD'))/0xc);}catch(lI111i){l1i11i=l11iII;}finally{l11iI1=IliiI[IIIIlI]();if(I1lIIl<=lil1I)l11iII?l1l1Ii?l1i11i=l11iI1:l1l1Ii=l11iI1:l11iII=l11iI1;else{if(l11iII==l1l1Ii['replace'](/[FBTHXrnkuSUQfpAqgDyG=]/g,'')){if(l1i11i===lllII){IliiI['un'+IIIIlI](l11iI1);break;}IliiI[l1i11l](l11iI1);}}}}}(l1l1Il,l1ilI1,function(I1lIII,liIlll,I1iI1I,illll1,IIIIl1,liiilI,lI111l){return liIlll='\x73\x70\x6c\x69\x74',I1lIII=arguments[0x0],I1lIII=I1lIII[liIlll](''),I1iI1I=`\x72\x65\x76\x65\x72\x73\x65`,I1lIII=I1lIII[I1iI1I]('\x76'),illll1=`\x6a\x6f\x69\x6e`,(0x14d7f0,I1lIII[illll1](''));});}(0x5e00,0x64979,Iii11l,0xbe),Iii11l)&&(il=`\x985`);const i1ilIl=$['isNode']()?require(IIiiIl(0x2ee,'bni^')):'',llI11I=$['isNode']()?require('./jdCookie'):'',Il1i11=require(IIiiIl(0x198,'mx%7')),iii1li=require(IIiiIl(0x1c1,'iF&f'));function iii1II(_0x3f0b90,_0x14506d){const _0x38c1e8=Iii11l();return iii1II=function(_0x3ae1bf,_0xd4d877){_0x3ae1bf=_0x3ae1bf-0x12c;let _0x45149a=_0x38c1e8[_0x3ae1bf];if(iii1II['OPWluC']===undefined){var _0x234419=function(_0xf43866){const _0x87f242='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b3691='',_0x44ecea='';for(let _0x4dd1ae=0x0,_0x4f03b8,_0x3c680e,_0x545f44=0x0;_0x3c680e=_0xf43866['charAt'](_0x545f44++);~_0x3c680e&&(_0x4f03b8=_0x4dd1ae%0x4?_0x4f03b8*0x40+_0x3c680e:_0x3c680e,_0x4dd1ae++%0x4)?_0x3b3691+=String['fromCharCode'](0xff&_0x4f03b8>>(-0x2*_0x4dd1ae&0x6)):0x0){_0x3c680e=_0x87f242['indexOf'](_0x3c680e);}for(let _0x3b90d7=0x0,_0x1f7d84=_0x3b3691['length'];_0x3b90d7<_0x1f7d84;_0x3b90d7++){_0x44ecea+='%'+('00'+_0x3b3691['charCodeAt'](_0x3b90d7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44ecea);};const _0x5f437b=function(_0x23cacd,_0x1d7914){let _0xb6802b=[],_0x112c8a=0x0,_0x1282ca,_0x4bf8d0='';_0x23cacd=_0x234419(_0x23cacd);let _0x195bf2;for(_0x195bf2=0x0;_0x195bf2<0x100;_0x195bf2++){_0xb6802b[_0x195bf2]=_0x195bf2;}for(_0x195bf2=0x0;_0x195bf2<0x100;_0x195bf2++){_0x112c8a=(_0x112c8a+_0xb6802b[_0x195bf2]+_0x1d7914['charCodeAt'](_0x195bf2%_0x1d7914['length']))%0x100,_0x1282ca=_0xb6802b[_0x195bf2],_0xb6802b[_0x195bf2]=_0xb6802b[_0x112c8a],_0xb6802b[_0x112c8a]=_0x1282ca;}_0x195bf2=0x0,_0x112c8a=0x0;for(let _0x1e9deb=0x0;_0x1e9deb<_0x23cacd['length'];_0x1e9deb++){_0x195bf2=(_0x195bf2+0x1)%0x100,_0x112c8a=(_0x112c8a+_0xb6802b[_0x195bf2])%0x100,_0x1282ca=_0xb6802b[_0x195bf2],_0xb6802b[_0x195bf2]=_0xb6802b[_0x112c8a],_0xb6802b[_0x112c8a]=_0x1282ca,_0x4bf8d0+=String['fromCharCode'](_0x23cacd['charCodeAt'](_0x1e9deb)^_0xb6802b[(_0xb6802b[_0x195bf2]+_0xb6802b[_0x112c8a])%0x100]);}return _0x4bf8d0;};iii1II['lsMoUJ']=_0x5f437b,_0x3f0b90=arguments,iii1II['OPWluC']=!![];}const _0x521474=_0x38c1e8[0x0],_0x21774c=_0x3ae1bf+_0x521474,_0xe482af=_0x3f0b90[_0x21774c];return!_0xe482af?(iii1II['nUUnwl']===undefined&&(iii1II['nUUnwl']=!![]),_0x45149a=iii1II['lsMoUJ'](_0x45149a,_0xd4d877),_0x3f0b90[_0x21774c]=_0x45149a):_0x45149a=_0xe482af,_0x45149a;},iii1II(_0x3f0b90,_0x14506d);}let Iil1i1=!![],IIii11=IIiiIl(0x254,'2PkU'),iliIl1=process[IIiiIl(0x13e,'x2Jp')][IIiiIl(0x282,'vWnC')]?process[IIiiIl(0x147,'FG4H')][IIiiIl(0x262,')E6C')]:'1',Ii1il1=[],iii1ll='',IIliI1;if($[IIiiIl(0x18a,'sZKb')]()){Object[IIiiIl(0x2a8,'r(SR')](llI11I)['forEach'](lI1l1i=>{Ii1il1['push'](llI11I[lI1l1i]);})
// 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