mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-22 22:03:27 +08:00
208 lines
13 KiB
JavaScript
208 lines
13 KiB
JavaScript
var _0xafb7 = ['0123456789abcdef', 'charAt', 'length', 'abc', '900150983cd24fb0d6963f7d28e17f72', 'concat', 'charCodeAt', '0123456789ABCDEF'];
|
|
(function (_0x1d2076, _0x2a7e5a) {
|
|
var _0x6ffefc = function (_0x3ddd21) {
|
|
while (--_0x3ddd21) {
|
|
_0x1d2076['push'](_0x1d2076['shift']());
|
|
}
|
|
};
|
|
_0x6ffefc(++_0x2a7e5a);
|
|
}(_0xafb7, 0x132));
|
|
var _0x4f75 = function (_0x254029, _0x1d4b71) {
|
|
_0x254029 = _0x254029 - 0x0;
|
|
var _0x18b07e = _0xafb7[_0x254029];
|
|
return _0x18b07e;
|
|
};
|
|
var hexcase = 0x0;
|
|
var b64pad = '';
|
|
var chrsz = 0x8;
|
|
|
|
function hex_md5(_0x3066e8) {
|
|
return binl2hex(core_md5(str2binl(_0x3066e8), _0x3066e8[_0x4f75('0x0')] * chrsz));
|
|
}
|
|
|
|
function b64_md5(_0x3e6d2a) {
|
|
return binl2b64(core_md5(str2binl(_0x3e6d2a), _0x3e6d2a[_0x4f75('0x0')] * chrsz));
|
|
}
|
|
|
|
function str_md5(_0x299d77) {
|
|
return binl2str(core_md5(str2binl(_0x299d77), _0x299d77[_0x4f75('0x0')] * chrsz));
|
|
}
|
|
|
|
function hex_hmac_md5(_0x527dc3, _0x2917f0) {
|
|
return binl2hex(core_hmac_md5(_0x527dc3, _0x2917f0));
|
|
}
|
|
|
|
function b64_hmac_md5(_0xef9e7f, _0x59c8eb) {
|
|
return binl2b64(core_hmac_md5(_0xef9e7f, _0x59c8eb));
|
|
}
|
|
|
|
function str_hmac_md5(_0x281d11, _0x378864) {
|
|
return binl2str(core_hmac_md5(_0x281d11, _0x378864));
|
|
}
|
|
|
|
function md5_vm_test() {
|
|
return hex_md5(_0x4f75('0x1')) == _0x4f75('0x2');
|
|
}
|
|
|
|
function core_md5(_0x22ee7b, _0x5112e5) {
|
|
_0x22ee7b[_0x5112e5 >> 0x5] |= 0x80 << _0x5112e5 % 0x20;
|
|
_0x22ee7b[(_0x5112e5 + 0x40 >>> 0x9 << 0x4) + 0xe] = _0x5112e5;
|
|
var _0x24dc11 = 0x67452301;
|
|
var _0x4d8080 = -0x10325477;
|
|
var _0x5a0e38 = -0x67452302;
|
|
var _0x1bea03 = 0x10325476;
|
|
for (var _0x19201a = 0x0; _0x19201a < _0x22ee7b['length']; _0x19201a += 0x10) {
|
|
var _0x5690f3 = _0x24dc11;
|
|
var _0x278f34 = _0x4d8080;
|
|
var _0x39995b = _0x5a0e38;
|
|
var _0x43e134 = _0x1bea03;
|
|
_0x24dc11 = md5_ff(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x0], 0x7, -0x28955b88);
|
|
_0x1bea03 = md5_ff(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x1], 0xc, -0x173848aa);
|
|
_0x5a0e38 = md5_ff(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x2], 0x11, 0x242070db);
|
|
_0x4d8080 = md5_ff(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x3], 0x16, -0x3e423112);
|
|
_0x24dc11 = md5_ff(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x4], 0x7, -0xa83f051);
|
|
_0x1bea03 = md5_ff(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x5], 0xc, 0x4787c62a);
|
|
_0x5a0e38 = md5_ff(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x6], 0x11, -0x57cfb9ed);
|
|
_0x4d8080 = md5_ff(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x7], 0x16, -0x2b96aff);
|
|
_0x24dc11 = md5_ff(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x8], 0x7, 0x698098d8);
|
|
_0x1bea03 = md5_ff(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x9], 0xc, -0x74bb0851);
|
|
_0x5a0e38 = md5_ff(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xa], 0x11, -0xa44f);
|
|
_0x4d8080 = md5_ff(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xb], 0x16, -0x76a32842);
|
|
_0x24dc11 = md5_ff(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0xc], 0x7, 0x6b901122);
|
|
_0x1bea03 = md5_ff(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xd], 0xc, -0x2678e6d);
|
|
_0x5a0e38 = md5_ff(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xe], 0x11, -0x5986bc72);
|
|
_0x4d8080 = md5_ff(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xf], 0x16, 0x49b40821);
|
|
_0x24dc11 = md5_gg(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x1], 0x5, -0x9e1da9e);
|
|
_0x1bea03 = md5_gg(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x6], 0x9, -0x3fbf4cc0);
|
|
_0x5a0e38 = md5_gg(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xb], 0xe, 0x265e5a51);
|
|
_0x4d8080 = md5_gg(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x0], 0x14, -0x16493856);
|
|
_0x24dc11 = md5_gg(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x5], 0x5, -0x29d0efa3);
|
|
_0x1bea03 = md5_gg(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xa], 0x9, 0x2441453);
|
|
_0x5a0e38 = md5_gg(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xf], 0xe, -0x275e197f);
|
|
_0x4d8080 = md5_gg(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x4], 0x14, -0x182c0438);
|
|
_0x24dc11 = md5_gg(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x9], 0x5, 0x21e1cde6);
|
|
_0x1bea03 = md5_gg(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xe], 0x9, -0x3cc8f82a);
|
|
_0x5a0e38 = md5_gg(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x3], 0xe, -0xb2af279);
|
|
_0x4d8080 = md5_gg(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x8], 0x14, 0x455a14ed);
|
|
_0x24dc11 = md5_gg(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0xd], 0x5, -0x561c16fb);
|
|
_0x1bea03 = md5_gg(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x2], 0x9, -0x3105c08);
|
|
_0x5a0e38 = md5_gg(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x7], 0xe, 0x676f02d9);
|
|
_0x4d8080 = md5_gg(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xc], 0x14, -0x72d5b376);
|
|
_0x24dc11 = md5_hh(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x5], 0x4, -0x5c6be);
|
|
_0x1bea03 = md5_hh(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x8], 0xb, -0x788e097f);
|
|
_0x5a0e38 = md5_hh(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xb], 0x10, 0x6d9d6122);
|
|
_0x4d8080 = md5_hh(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xe], 0x17, -0x21ac7f4);
|
|
_0x24dc11 = md5_hh(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x1], 0x4, -0x5b4115bc);
|
|
_0x1bea03 = md5_hh(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x4], 0xb, 0x4bdecfa9);
|
|
_0x5a0e38 = md5_hh(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x7], 0x10, -0x944b4a0);
|
|
_0x4d8080 = md5_hh(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xa], 0x17, -0x41404390);
|
|
_0x24dc11 = md5_hh(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0xd], 0x4, 0x289b7ec6);
|
|
_0x1bea03 = md5_hh(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x0], 0xb, -0x155ed806);
|
|
_0x5a0e38 = md5_hh(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x3], 0x10, -0x2b10cf7b);
|
|
_0x4d8080 = md5_hh(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x6], 0x17, 0x4881d05);
|
|
_0x24dc11 = md5_hh(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x9], 0x4, -0x262b2fc7);
|
|
_0x1bea03 = md5_hh(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xc], 0xb, -0x1924661b);
|
|
_0x5a0e38 = md5_hh(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xf], 0x10, 0x1fa27cf8);
|
|
_0x4d8080 = md5_hh(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x2], 0x17, -0x3b53a99b);
|
|
_0x24dc11 = md5_ii(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x0], 0x6, -0xbd6ddbc);
|
|
_0x1bea03 = md5_ii(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x7], 0xa, 0x432aff97);
|
|
_0x5a0e38 = md5_ii(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xe], 0xf, -0x546bdc59);
|
|
_0x4d8080 = md5_ii(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x5], 0x15, -0x36c5fc7);
|
|
_0x24dc11 = md5_ii(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0xc], 0x6, 0x655b59c3);
|
|
_0x1bea03 = md5_ii(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x3], 0xa, -0x70f3336e);
|
|
_0x5a0e38 = md5_ii(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xa], 0xf, -0x100b83);
|
|
_0x4d8080 = md5_ii(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x1], 0x15, -0x7a7ba22f);
|
|
_0x24dc11 = md5_ii(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x8], 0x6, 0x6fa87e4f);
|
|
_0x1bea03 = md5_ii(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xf], 0xa, -0x1d31920);
|
|
_0x5a0e38 = md5_ii(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x6], 0xf, -0x5cfebcec);
|
|
_0x4d8080 = md5_ii(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xd], 0x15, 0x4e0811a1);
|
|
_0x24dc11 = md5_ii(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x4], 0x6, -0x8ac817e);
|
|
_0x1bea03 = md5_ii(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xb], 0xa, -0x42c50dcb);
|
|
_0x5a0e38 = md5_ii(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x2], 0xf, 0x2ad7d2bb);
|
|
_0x4d8080 = md5_ii(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x9], 0x15, -0x14792c6f);
|
|
_0x24dc11 = safe_add(_0x24dc11, _0x5690f3);
|
|
_0x4d8080 = safe_add(_0x4d8080, _0x278f34);
|
|
_0x5a0e38 = safe_add(_0x5a0e38, _0x39995b);
|
|
_0x1bea03 = safe_add(_0x1bea03, _0x43e134);
|
|
}
|
|
return Array(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03);
|
|
}
|
|
|
|
function md5_cmn(_0x13da99, _0x4e97a4, _0x35d420, _0x2be282, _0x30ef48, _0x31cceb) {
|
|
return safe_add(bit_rol(safe_add(safe_add(_0x4e97a4, _0x13da99), safe_add(_0x2be282, _0x31cceb)), _0x30ef48), _0x35d420);
|
|
}
|
|
|
|
function md5_ff(_0x3470ed, _0xb5effa, _0x477770, _0x33e34f, _0x356226, _0x13dc1d, _0x1e29c9) {
|
|
return md5_cmn(_0xb5effa & _0x477770 | ~_0xb5effa & _0x33e34f, _0x3470ed, _0xb5effa, _0x356226, _0x13dc1d, _0x1e29c9);
|
|
}
|
|
|
|
function md5_gg(_0x489772, _0x4cd15b, _0x53464d, _0x48aa94, _0x6a0a55, _0x12dbfb, _0x410e93) {
|
|
return md5_cmn(_0x4cd15b & _0x48aa94 | _0x53464d & ~_0x48aa94, _0x489772, _0x4cd15b, _0x6a0a55, _0x12dbfb, _0x410e93);
|
|
}
|
|
|
|
function md5_hh(_0x2fb64f, _0x38b15b, _0x102f48, _0x3dc19b, _0x5e25aa, _0x3ae390, _0x89e2fc) {
|
|
return md5_cmn(_0x38b15b ^ _0x102f48 ^ _0x3dc19b, _0x2fb64f, _0x38b15b, _0x5e25aa, _0x3ae390, _0x89e2fc);
|
|
}
|
|
|
|
function md5_ii(_0x1a821d, _0x1e15bd, _0x2e26e7, _0x1a3729, _0x3ef1a2, _0x32fa53, _0x163466) {
|
|
return md5_cmn(_0x2e26e7 ^ (_0x1e15bd | ~_0x1a3729), _0x1a821d, _0x1e15bd, _0x3ef1a2, _0x32fa53, _0x163466);
|
|
}
|
|
|
|
function core_hmac_md5(_0x5d2cea, _0x5c190a) {
|
|
var _0x4e64d3 = str2binl(_0x5d2cea);
|
|
if (_0x4e64d3[_0x4f75('0x0')] > 0x10) _0x4e64d3 = core_md5(_0x4e64d3, _0x5d2cea['length'] * chrsz);
|
|
var _0x33c231 = Array(0x10), _0xe018a = Array(0x10);
|
|
for (var _0x5f0b9b = 0x0; _0x5f0b9b < 0x10; _0x5f0b9b++) {
|
|
_0x33c231[_0x5f0b9b] = _0x4e64d3[_0x5f0b9b] ^ 0x36363636;
|
|
_0xe018a[_0x5f0b9b] = _0x4e64d3[_0x5f0b9b] ^ 0x5c5c5c5c;
|
|
}
|
|
var _0x30e59b = core_md5(_0x33c231[_0x4f75('0x3')](str2binl(_0x5c190a)), 0x200 + _0x5c190a[_0x4f75('0x0')] * chrsz);
|
|
return core_md5(_0xe018a[_0x4f75('0x3')](_0x30e59b), 0x200 + 0x80);
|
|
}
|
|
|
|
function safe_add(_0x3f936b, _0x452433) {
|
|
var _0x2830ca = (_0x3f936b & 0xffff) + (_0x452433 & 0xffff);
|
|
var _0x558dbe = (_0x3f936b >> 0x10) + (_0x452433 >> 0x10) + (_0x2830ca >> 0x10);
|
|
return _0x558dbe << 0x10 | _0x2830ca & 0xffff;
|
|
}
|
|
|
|
function bit_rol(_0x4ae01b, _0x223c0d) {
|
|
return _0x4ae01b << _0x223c0d | _0x4ae01b >>> 0x20 - _0x223c0d;
|
|
}
|
|
|
|
function str2binl(_0x5c42d1) {
|
|
var _0x18b049 = Array();
|
|
var _0x4fdd09 = (0x1 << chrsz) - 0x1;
|
|
for (var _0x3fe83f = 0x0; _0x3fe83f < _0x5c42d1[_0x4f75('0x0')] * chrsz; _0x3fe83f += chrsz) _0x18b049[_0x3fe83f >> 0x5] |= (_0x5c42d1[_0x4f75('0x4')](_0x3fe83f / chrsz) & _0x4fdd09) << _0x3fe83f % 0x20;
|
|
return _0x18b049;
|
|
}
|
|
|
|
function binl2str(_0xf5e77a) {
|
|
var _0x2c8aff = '';
|
|
var _0x4a565 = (0x1 << chrsz) - 0x1;
|
|
for (var _0x24957b = 0x0; _0x24957b < _0xf5e77a[_0x4f75('0x0')] * 0x20; _0x24957b += chrsz) _0x2c8aff += String['fromCharCode'](_0xf5e77a[_0x24957b >> 0x5] >>> _0x24957b % 0x20 & _0x4a565);
|
|
return _0x2c8aff;
|
|
}
|
|
|
|
function binl2hex(_0x2a8297) {
|
|
var _0x15a7cb = hexcase ? _0x4f75('0x5') : _0x4f75('0x6');
|
|
var _0x1be29d = '';
|
|
for (var _0x112c2f = 0x0; _0x112c2f < _0x2a8297[_0x4f75('0x0')] * 0x4; _0x112c2f++) {
|
|
_0x1be29d += _0x15a7cb['charAt'](_0x2a8297[_0x112c2f >> 0x2] >> _0x112c2f % 0x4 * 0x8 + 0x4 & 0xf) + _0x15a7cb[_0x4f75('0x7')](_0x2a8297[_0x112c2f >> 0x2] >> _0x112c2f % 0x4 * 0x8 & 0xf);
|
|
}
|
|
return _0x1be29d;
|
|
}
|
|
|
|
function binl2b64(_0x1f399a) {
|
|
var _0x4657e3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
var _0x3409f2 = '';
|
|
for (var _0x54da0a = 0x0; _0x54da0a < _0x1f399a[_0x4f75('0x0')] * 0x4; _0x54da0a += 0x3) {
|
|
var _0x71178d = (_0x1f399a[_0x54da0a >> 0x2] >> 0x8 * (_0x54da0a % 0x4) & 0xff) << 0x10 | (_0x1f399a[_0x54da0a + 0x1 >> 0x2] >> 0x8 * ((_0x54da0a + 0x1) % 0x4) & 0xff) << 0x8 | _0x1f399a[_0x54da0a + 0x2 >> 0x2] >> 0x8 * ((_0x54da0a + 0x2) % 0x4) & 0xff;
|
|
for (var _0x33e70d = 0x0; _0x33e70d < 0x4; _0x33e70d++) {
|
|
if (_0x54da0a * 0x8 + _0x33e70d * 0x6 > _0x1f399a[_0x4f75('0x0')] * 0x20) _0x3409f2 += b64pad; else _0x3409f2 += _0x4657e3[_0x4f75('0x7')](_0x71178d >> 0x6 * (0x3 - _0x33e70d) & 0x3f);
|
|
}
|
|
}
|
|
return _0x3409f2;
|
|
}
|
|
|
|
console.log(hex_md5("NightTeam")); |