jdpro/utils/Rebels_jdCommon.js

6 lines
89 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
专用依赖库必须存在否则报错
new Env('Rebels_jdCommon');
*/
2024-06-29 00:33:04 +00:00
const _0x577ef3=_0x4d00;(function(_0x2bff9e,_0x1e11d6){const _0x442f46=_0x4d00,_0x4b615c=_0x2bff9e();while(!![]){try{const _0x5cbb49=-parseInt(_0x442f46(0x1de,'sXuT'))/0x1+-parseInt(_0x442f46(0x38d,'vYN6'))/0x2+parseInt(_0x442f46(0x2bd,'K@Pf'))/0x3*(parseInt(_0x442f46(0x321,'d$f4'))/0x4)+-parseInt(_0x442f46(0x230,'1PQk'))/0x5+-parseInt(_0x442f46(0x1fc,'&$13'))/0x6*(-parseInt(_0x442f46(0xd5,'sXuT'))/0x7)+-parseInt(_0x442f46(0x122,'BjyE'))/0x8*(-parseInt(_0x442f46(0x239,'4lm!'))/0x9)+parseInt(_0x442f46(0x2ec,'ntSt'))/0xa;if(_0x5cbb49===_0x1e11d6)break;else _0x4b615c['push'](_0x4b615c['shift']());}catch(_0x34d018){_0x4b615c['push'](_0x4b615c['shift']());}}}(_0x1cf6,0x52e90));const fs=require('fs'),path=require(_0x577ef3(0x21d,'wc2*')),https=require('https'),axios=require(_0x577ef3(0x3d1,'wc2*'))[_0x577ef3(0xee,'#6C6')],CryptoJS=require(_0x577ef3(0x215,'z7lY')),querystring=require(_0x577ef3(0x1f5,'R[K7'));class Common{constructor(){const _0x5b476f=_0x577ef3;this[_0x5b476f(0x1b6,'JO*5')]='',this[_0x5b476f(0x44d,'gNEL')]='',this[_0x5b476f(0x46e,'&$13')]=new Map(),this['_defaultUserAgent']=_0x5b476f(0x453,'sR)F'),this[_0x5b476f(0x36d,'I]rf')]=null,this[_0x5b476f(0x444,'gf#U')]=![],this[_0x5b476f(0x450,'4lm!')]='',this['_requestDebugMode']=![],this[_0x5b476f(0x19c,'jZ8V')]=null,this['_requestDynamicProxyConfig']=null,this[_0x5b476f(0x3aa,'RkJa')]=![],this[_0x5b476f(0x365,'jzwb')]=_0x5b476f(0x11f,'&$13'),this[_0x5b476f(0x29c,'ntSt')]=null,this[_0x5b476f(0x40d,'vYN6')]={0x190:_0x5b476f(0x43f,'s@$4'),0x191:'未授权\x20[401\x20Unauthorized]',0x193:_0x5b476f(0x29a,'1PQk'),0x1ed:'禁止访问\x20[493\x20Forbidden]',0x194:_0x5b476f(0x113,'QlSN'),0x198:_0x5b476f(0x1ce,'g5sL'),0x1ad:_0x5b476f(0x173,'4oE#'),0x1f4:'服务器内部错误\x20[500\x20Internal\x20Server\x20Error]',0x1f6:_0x5b476f(0x22b,'RkJa'),0x1f7:_0x5b476f(0x389,'%T[f')},this[_0x5b476f(0x37b,'I]rf')]={'ECONNABORTED':_0x5b476f(0x29b,'ntSt'),'ECONNRESET':_0x5b476f(0x38f,'BjyE'),'ECONNREFUSED':_0x5b476f(0x393,'1PQk'),'ETIMEDOUT':'网络请求超时','ENOTFOUND':'无法解析的域名或地址','EPROTO':_0x5b476f(0x1c0,'sLsu'),'EHOSTUNREACH':_0x5b476f(0x30f,'BjyE'),'ENETUNREACH':_0x5b476f(0x474,'l[0J'),'EADDRINUSE':_0x5b476f(0x1f9,'sR)F'),'EPIPE':'向已关闭的写入流进行写入','ERR_BAD_OPTION_VALUE':_0x5b476f(0x35e,'I]rf'),'ERR_BAD_OPTION':_0x5b476f(0x17d,'gdoT'),'ERR_NETWORK':'网络错误','ERR_FR_TOO_MANY_REDIRECTS':_0x5b476f(0x438,'K@Pf'),'ERR_DEPRECATED':_0x5b476f(0x24c,'#6C6'),'ERR_BAD_RESPONSE':_0x5b476f(0x339,'sLsu'),'ERR_BAD_REQUEST':'请求无效或缺少必需参数','ERR_CANCELED':_0x5b476f(0x2b6,'jzwb'),'ERR_NOT_SUPPORT':'当前环境不支持此特性或方法','ERR_INVALID_URL':_0x5b476f(0x181,'&dnB'),'ERR_TLS_CERT_ALTNAME_INVALID':_0x5b476f(0xcb,'vYN6'),'ERR_TLS_CERT_REJECTED':_0x5b476f(0xdf,'BjyE'),'ERR_HTTP2_STREAM_CANCEL':_0x5b476f(0x36f,'Ov(c'),'ERR_HTTP2_SESSION_ERROR':'HTTP2\x20会话出错','ERR_QUICSESSION_VERSION_NEGOTIATION':_0x5b476f(0x316,'ErxO'),'EAI_AGAIN':_0x5b476f(0x290,'S5SV')},this[_0x5b476f(0x460,'sLsu')]={'build':_0x5b476f(0x1a1,'s@$4'),'version':_0x5b476f(0x18d,'JO*5')},this[_0x5b476f(0x140,'Ae#n')]={'build':_0x5b476f(0x44a,'jzwb'),'version':_0x5b476f(0x1ae,'KeFS')},this[_0x5b476f(0x25b,'4lm!')]=_0x5b476f(0x2a5,'KeFS'),this['_appHttpsTlsOptions']={'ciphers':[_0x5b476f(0x259,'jzwb'),_0x5b476f(0x3ca,'g5sL'),_0x5b476f(0x381,'jZ8V'),'ECDHE-RSA-AES128-GCM-SHA256',_0x5b476f(0x436,'vYN6'),'ECDHE-ECDSA-AES128-GCM-SHA256','ECDHE-ECDSA-AES256-GCM-SHA384',_0x5b476f(0x3e2,'BjyE'),_0x5b476f(0x1a8,'Ae#n')][_0x5b476f(0xc5,'s@$4')](':')},this['Base64']=Base64Algorithm,this[_0x5b476f(0x33b,'QlSN')]=LocalStorageCache,this['_shopMemberActivityIds']=new Map(),this[_0x5b476f(0x168,'g5sL')]=null,this[_0x5b476f(0x11b,'vYN6')]=null,this[_0x5b476f(0x326,'CYEy')]=null,this[_0x5b476f(0x362,'liBC')]=__dirname+_0x5b476f(0x43b,'R[K7'),this['_jdCryptoModelPath']=__dirname+_0x5b476f(0x14f,'sXuT'),this[_0x5b476f(0x277,'566d')]=![],this[_0x5b476f(0x2a7,'z7lY')]();}[_0x577ef3(0xfa,'l[0J')](){const _0x1b1d95=_0x577ef3;try{const _0x211a68=require[_0x1b1d95(0x40b,'O^2