mirror of https://github.com/6dylan6/jdpro.git
30 lines
24 KiB
JavaScript
30 lines
24 KiB
JavaScript
|
/*
|
|||
|
主要获取 isvObfuscator token值
|
|||
|
|
|||
|
获取签名,自定义使用方法如下
|
|||
|
|
|||
|
- 请求 API 获取
|
|||
|
|
|||
|
export JD_SIGN_API="" # 接口地址,例:http://127.0.0.1:3000/api/getSign,默认 'http://api.nolanstore.cc/sign'
|
|||
|
export JD_SIGN_API_BODY_FIELD="" # body参数字段名,默认 'body'
|
|||
|
export JD_SIGN_API_FUNCTIONID_FIELD="" # functionId参数字段名,默认 'fn'
|
|||
|
export JD_SIGN_API_METHOD="" # 请求方法,默认 'POST',自定义仅支持 'GET'
|
|||
|
export JD_SIGN_API_CONTENT_TYPE="" # 请求头 'Content-Type',默认 'application/json; charset=utf-8',支持 'application/x-www-form-urlencoded' 格式
|
|||
|
JSON响应格式解析的字段目前仅支持 `body` `convertUrl` `convertUrlNew`
|
|||
|
|
|||
|
- 本地自定义脚本生成
|
|||
|
|
|||
|
如果存在本地签名生成脚本则会优先加载本地签名,具体规范如下:
|
|||
|
- 1. 需要将脚本命名为 Rebels_Sign.js 并存储在与 Rebels_Token 脚本同一目录下
|
|||
|
- 2. 调用函数名为 genSign 并且需要 export 导出
|
|||
|
- 3. 函数固定两个传参,分别是 functionId(函数id) 和 bodyParams(body参数对象)
|
|||
|
- 4. 函数需要返回含有 body、st、sign、sv 等关键字段的url参数形式的签名字符串
|
|||
|
|
|||
|
不管通过何种途径获取签名,最终需要的签名形式为url参数格式且至少包含 `body` `st` `sv` `sign` 字段
|
|||
|
|
|||
|
|
|||
|
|
|||
|
new Env('Rebels_Token');
|
|||
|
*/
|
|||
|
|
|||
|
var iil='jsjiami.com.v7';const l1iII1=iii1II;(function(IlIlii,i1l1i1,liil11,iiillI,l1l111,l1iIII,llI1I1){return IlIlii=IlIlii>>0x5,l1iIII='hs',llI1I1='hs',function(IlIlil,lIli1I,II1il,lllI11,I1lIll){const IlIliI=iii1II;lllI11='tfi',l1iIII=lllI11+l1iIII,I1lIll='up',llI1I1+=I1lIll,l1iIII=II1il(l1iIII),llI1I1=II1il(llI1I1),II1il=0x0;const I1lIli=IlIlil();while(!![]&&--iiillI+lIli1I){try{lllI11=parseInt(IlIliI(0x101,'BGGr'))/0x1*(parseInt(IlIliI(0x194,'bx^6'))/0x2)+parseInt(IlIliI(0x15e,'!y$5'))/0x3*(-parseInt(IlIliI(0xfc,'!y$5'))/0x4)+parseInt(IlIliI(0x102,'CYO3'))/0x5*(-parseInt(IlIliI(0xf8,'fPGH'))/0x6)+-parseInt(IlIliI(0xfd,'TG%E'))/0x7+-parseInt(IlIliI(0xf1,'Rqz%'))/0x8*(-parseInt(IlIliI(0x17f,'bH2m'))/0x9)+parseInt(IlIliI(0x176,'!y$5'))/0xa+parseInt(IlIliI(0x10f,'[daq'))/0xb;}catch(II1ii){lllI11=II1il;}finally{I1lIll=I1lIli[l1iIII]();if(IlIlii<=iiillI)II1il?l1l111?lllI11=I1lIll:l1l111=I1lIll:II1il=I1lIll;else{if(II1il==l1l111['replace'](/[UArQkJNxeDTbPWByCOwRFg=]/g,'')){if(lllI11===lIli1I){I1lIli['un'+l1iIII](I1lIll);break;}I1lIli[llI1I1](I1lIll);}}}}}(liil11,i1l1i1,function(IIIIII,lillII,ii1ilI,lI1ll1,iIiI1,liil1I,i11ii1){return lillII='\x73\x70\x6c\x69\x74',IIIIII=arguments[0x0],IIIIII=IIIIII[lillII](''),ii1ilI=`\x72\x65\x76\x65\x72\x73\x65`,IIIIII=IIIIII[ii1ilI]('\x76'),lI1ll1=`\x6a\x6f\x69\x6e`,(0x173327,IIIIII[lI1ll1](''));});}(0x1840,0x2b85b,Iii11l,0xc4),Iii11l)&&(iil=Iii11l);const path=require(l1iII1(0x13a,'k0Y)')),common=require(l1iII1(0x10e,'bH2m'));let scriptName=null,expireMinutes=0x1d;try{let tmpMinutes=parseInt(process[l1iII1(0x151,'ldU&')]['JD_ISV_TOKEN_CACHE_EXPIRE_MINUTES']||'29');expireMinutes=tmpMinutes;}catch{}const defaultCacheTTL=expireMinutes*0x3c*0x3e8,TokenCache=new common[(l1iII1(0x126,'^lT0'))](process['env'][l1iII1(0x109,'7zK2')]||__dirname+l1iII1(0x12a,'uJmV'),defaultCacheTTL,0x2bf20),lzkjPinFilter=(process['env'][l1iII1(0x11e,'LOZ!')]||'')['split']('@'),lzkjPinFilter_interactsaas_and_interaction_v1=(process[l1iII1(0x108,'k0Y)')][l1iII1(0x174,'BbD0')]||process[l1iII1(0x16b,'V3&D')]['JD_ISV_TOKEN_LZKJ_NEW_PIN_FILTER']||process[l1iII1(0x16a,'FIU3')][l1iII1(0x19a,'k0Y)')]||'')['split']('@'),lzkjPinFilter_interaction_v2=(process[l1iII1(0x158,'Cwk&')][l1iII1(0x184,'bx^6')]||'')[l1iII1(0x19e,'fPGH')]('@'),cjhyPinFilter=(process[l1iII1(0xf5,'Jjrj')][l1iII1(0x13d,'LOZ!')]||'')[l1iII1(0x144,'^X7)')]('@');let requestAxiosProxyConfig,requestDynamicProxyConfig;try{const proxyAddress=process[l1iII1(0x18a,'mrR)')][l1iII1(0xec,'Q)0d')]||process[l1iII1(0xf5,'Jjrj')][l1iII1(0x156,'7zK2')]||'';if(proxyAddress){const proxyConfig=common[l1iII1(0x157,'AnW3')](proxyAddress);proxyConfig?(requestAxiosProxyConfig=proxyConfig,console[l1iII1(0x120,'[daq')]('\x0a===============启用\x20getToken\x20代理池代理(新)==============\x0a')):console['log'](l1iII1(0x105,'kT6g'));}else{const proxyApi=process[l1iII1(0x1ab,'CQtq')][l1iII1(0x1aa,'bx^6')]||process[l1iII1(0x177,'BmX]')]['JD_ISV_TOKEN_PROXY_API']||'';if(proxyApi){requestDynamicProxyConfig={'api':null,'proxyConfig':null,'useLimit':null,'timeLimit':null,'fetchFailContinue':null,'extractTimestamp':null,'lastUseTimeStamp':null,'usedTimes':null},requestDynamicProxyConfig[l1iII1(0x181,'k0Y)')]=proxyApi;const useLimit=process[l1iII1(0x1a6,'^lT0')][l1iII1(0x117,'p(dw')]||process['env'][l1iII1(0x148,'#F(N')]||'0';try{requestDynamicProxyConfig[l1iII1(0xf9,'37m9')]=parseInt(useLimit);}catch{requestDynamicProxyConfig[l1iII1(0xee,'7zK2')]=0x1;}const timeLimit=process[l1iII1(0x1ab,'CQtq')][l1iII1(0x167,'bx^6')]||'10000';try{requestDynamicProxyConfig[l1iII1(0x170,'AnW3')]=parseInt(timeLimit);}catch{requestDynamicProxyConfig[l1iII1(0x1b6,'#GVO')]=0x2710;}requestDynamicProxyConfig['fetchFailContinue']=(process[l1iII1(0x169,'wBud')]['RS_ISV_TOKEN_PROXY_FETCH_FAIL_CONTINUE']||l1iII1(0x1a0,'^X7)'))===l1iII1(0xf4,'fPGH'),console[l1iII1(0x18b,'tNqN')](l1iII1(0x197,'BmX]'));}}const globalProxy=process['env'][l1iII1(0x13f,'55Pn')]===l1iII1(0x153,'7zK2');if(globalProxy)try{require(l1iII1(0x131,'[daq')),console[l1iII1(0x161,'^X7)')]('\x0a===============启用\x20getToken\x20代理<EFBFBD><EFBFBD>
|