KR/function/krgetToken.js

16 lines
20 KiB
JavaScript
Raw Normal View History

2023-09-09 10:31:22 +08:00
/*
new Env('getToken');
变量
JD_TOKEN_INTERVAL //获取接口403延迟等待时长正整数默认延迟 30s=30000ms
2023-09-09 11:16:51 +08:00
JD_NEWTOKEN_INTERVAL //获取接口成功延迟等待时长(正整数),默认延迟 0s
2023-09-11 23:17:35 +08:00
JD_CACHE_INTERVAL //缓存TOKEN时长正整数默认缓存 25 分钟
JD_PROXY_OPEN // 代理启用变量默认不开启true/false
JD_PROXY_TUNNRL // 代理地址变量,默认不开启,仅支持代理池模式(auto-proxy-pool)格式为http://ip:port
2023-09-16 12:02:21 +08:00
JD_NO_PROXY // 禁止走代理,默认 127.0.0.1,*.baidu.com 需要自行修改
2023-09-09 10:31:22 +08:00
根据自行需要设定缓存文件数据通用不再区分域名
*/
2023-09-16 12:02:21 +08:00
var version_='jsjiami.com.v7';const iiIllill=Ii111I1l;(function(Illl1II,iIl1li1l,IIiiiii,illilii1,i1IIIIli,IlIliil1,li1iIl1I){return Illl1II=Illl1II>>0x2,IlIliil1='hs',li1iIl1I='hs',function(IilIliii,ii1llII1,iIlli11i,ll1iIIiI,lilI11II){const II1lIIiI=Ii111I1l;ll1iIIiI='tfi',IlIliil1=ll1iIIiI+IlIliil1,lilI11II='up',li1iIl1I+=lilI11II,IlIliil1=iIlli11i(IlIliil1),li1iIl1I=iIlli11i(li1iIl1I),iIlli11i=0x0;const IlIillI1=IilIliii();while(!![]&&--illilii1+ii1llII1){try{ll1iIIiI=parseInt(II1lIIiI(0x163,'(fC!'))/0x1+-parseInt(II1lIIiI(0x125,'c@^R'))/0x2+parseInt(II1lIIiI(0x119,'p00('))/0x3+-parseInt(II1lIIiI(0x13d,'0vY$'))/0x4*(parseInt(II1lIIiI(0x188,'x%SN'))/0x5)+parseInt(II1lIIiI(0x15e,'h4U2'))/0x6+parseInt(II1lIIiI(0x178,'Jgpr'))/0x7*(-parseInt(II1lIIiI(0x132,'C))g'))/0x8)+-parseInt(II1lIIiI(0x1a1,']7gH'))/0x9;}catch(iilliIl1){ll1iIIiI=iIlli11i;}finally{lilI11II=IlIillI1[IlIliil1]();if(Illl1II<=illilii1)iIlli11i?i1IIIIli?ll1iIIiI=lilI11II:i1IIIIli=lilI11II:iIlli11i=lilI11II;else{if(iIlli11i==i1IIIIli['replace'](/[BMlxhUbSnPORLJpQgGCI=]/g,'')){if(ll1iIIiI===ii1llII1){IlIillI1['un'+IlIliil1](lilI11II);break;}IlIillI1[li1iIl1I](lilI11II);}}}}}(IIiiiii,iIl1li1l,function(i1IIlilI,iililI1l,I11liiIi,IilIl1I1,Il1ili1i,Illl1il1,IIliilll){return iililI1l='\x73\x70\x6c\x69\x74',i1IIlilI=arguments[0x0],i1IIlilI=i1IIlilI[iililI1l](''),I11liiIi=`\x72\x65\x76\x65\x72\x73\x65`,i1IIlilI=i1IIlilI[I11liiIi]('\x76'),IilIl1I1=`\x6a\x6f\x69\x6e`,(0x13e7f9,i1IIlilI[IilIl1I1](''));});}(0x310,0x6ce85,I11li11l,0xc6),I11li11l)&&(version_=I11li11l);function Ii111I1l(_0xd191a0,_0x10fcfe){const _0x376a7f=I11li11l();return Ii111I1l=function(_0x3c1ada,_0x44ce7b){_0x3c1ada=_0x3c1ada-0x10a;let _0x23ad47=_0x376a7f[_0x3c1ada];if(Ii111I1l['aWKKVR']===undefined){var _0x390eac=function(_0x3a8aeb){const _0x51a1f9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5369e2='',_0x571974='';for(let _0x38c3e1=0x0,_0x513856,_0x4004bd,_0x57fab3=0x0;_0x4004bd=_0x3a8aeb['charAt'](_0x57fab3++);~_0x4004bd&&(_0x513856=_0x38c3e1%0x4?_0x513856*0x40+_0x4004bd:_0x4004bd,_0x38c3e1++%0x4)?_0x5369e2+=String['fromCharCode'](0xff&_0x513856>>(-0x2*_0x38c3e1&0x6)):0x0){_0x4004bd=_0x51a1f9['indexOf'](_0x4004bd);}for(let _0x3a0a43=0x0,_0x10afee=_0x5369e2['length'];_0x3a0a43<_0x10afee;_0x3a0a43++){_0x571974+='%'+('00'+_0x5369e2['charCodeAt'](_0x3a0a43)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x571974);};const _0x2d9d71=function(_0x2153b7,_0x207c5f){let _0x3b65be=[],_0x4148ca=0x0,_0x103c21,_0x4a5690='';_0x2153b7=_0x390eac(_0x2153b7);let _0x6a2f8a;for(_0x6a2f8a=0x0;_0x6a2f8a<0x100;_0x6a2f8a++){_0x3b65be[_0x6a2f8a]=_0x6a2f8a;}for(_0x6a2f8a=0x0;_0x6a2f8a<0x100;_0x6a2f8a++){_0x4148ca=(_0x4148ca+_0x3b65be[_0x6a2f8a]+_0x207c5f['charCodeAt'](_0x6a2f8a%_0x207c5f['length']))%0x100,_0x103c21=_0x3b65be[_0x6a2f8a],_0x3b65be[_0x6a2f8a]=_0x3b65be[_0x4148ca],_0x3b65be[_0x4148ca]=_0x103c21;}_0x6a2f8a=0x0,_0x4148ca=0x0;for(let _0x488204=0x0;_0x488204<_0x2153b7['length'];_0x488204++){_0x6a2f8a=(_0x6a2f8a+0x1)%0x100,_0x4148ca=(_0x4148ca+_0x3b65be[_0x6a2f8a])%0x100,_0x103c21=_0x3b65be[_0x6a2f8a],_0x3b65be[_0x6a2f8a]=_0x3b65be[_0x4148ca],_0x3b65be[_0x4148ca]=_0x103c21,_0x4a5690+=String['fromCharCode'](_0x2153b7['charCodeAt'](_0x488204)^_0x3b65be[(_0x3b65be[_0x6a2f8a]+_0x3b65be[_0x4148ca])%0x100]);}return _0x4a5690;};Ii111I1l['EseIJq']=_0x2d9d71,_0xd191a0=arguments,Ii111I1l['aWKKVR']=!![];}const _0x2913c5=_0x376a7f[0x0],_0x17c9c9=_0x3c1ada+_0x2913c5,_0x2acb28=_0xd191a0[_0x17c9c9];return!_0x2acb28?(Ii111I1l['ffqCUJ']===undefined&&(Ii111I1l['ffqCUJ']=!![]),_0x23ad47=Ii111I1l['EseIJq'](_0x23ad47,_0x44ce7b),_0xd191a0[_0x17c9c9]=_0x23ad47):_0x23ad47=_0x2acb28,_0x23ad47;},Ii111I1l(_0xd191a0,_0x10fcfe);}const iil1lill=require(iiIllill(0x148,'x9(o')),Ililll1I=require('./cache/index'),Ili11Il1=require('./krgetSign'),iiIilII=process['env'][iiIllill(0x183,'LF9O')]||'25';let llilIiII=parseInt(iiIilII)*0x3c*0x3e8;const li1=new Ililll1I(llilIiII,__dirname+'/cache/token.json'),iiIlIl1=[iiIllill(0x1a5,'GqlM'),'http://kr.kingran.cf/sign'],IilIilII=iiIlIl1[iiIilliI(0x0,iiIlIl1['length
module.exports = getToken;