中国空气质量在线监测分析平台之JS加密JS混淆处理
Posted open-yang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了中国空气质量在线监测分析平台之JS加密JS混淆处理相关的知识,希望对你有一定的参考价值。
中国空气质量在线监测分析平台数据爬取分析
页面分析:确定url、请求方式、请求参数、响应数据
1.访问网站首页:https://www.aqistudy.cn/html/city_detail.html,通过抓包工具分析首页请求并没有获取到页面内的数据信息
2.因此可以确定页面内的数据是动态加载的,通过抓包工具捕获加密的响应对象,
3.加密响应对象是通过post请求携带加密的参数发起(2次)。
4.综上分析可以确定,动态请求时在搜索按钮触发时发起的,因此通过火狐firefox浏览器分析页面搜索按钮的绑定事件以及定位到具体的代码在哪一行。
5.通过标签绑定事件可以确定是触发了getData()函数,因此对应转包工具捕获到的两次请求,进入js代码,找到函数的执行过程。
6。在当前js中搜索找到getAQIData();和getWeatherData();函数,也没发现ajax发起的post请求,但都调用了getServerData函数,只是唯一一个参数不同method = ‘GETDETAIL‘;method = ‘GETCITYWEATHER‘;,因此继续分析getServerData函数。
7.在当前js中为找到getServerData 函数定义,切换到google浏览器对请求响应进行全局搜索,获取函数定义---js反混淆。
8.将反混淆后的js代码进行保存,可以看到当前getServerData函数中发起了ajax请求。
9.分析找到动态请求参数的d的值对应的加密处理函数,同时找到响应数据对应的解密函数。
10。确定加密参数生成函数getParam()需要的参数,methodh和object对应的具体变量,在js中进行封装
function getPostCode(method, city, type, startTime, endTime) var param = ; param.city = city; param.type = type; param.startTime = startTime; param.endTime = endTime; return getParam(method, param);
11.响应对象解密函数decodeData()需要的参数为请求响应对象,解密后即为可读的响应数据。
爬虫脚本编写:python执行JS代码加密请求参数、解密响应数据
1.反混淆后加入自定义的参数加密函数jsCode.js代码
1 function Base64() 2 _2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", 3 this.encode = function (a) 4 var c, d, e, f, g, h, i, b = "", 5 j = 0; 6 for (a = _29(a); j < a.length;) c = a.charCodeAt(j++), 7 d = a.charCodeAt(j++), 8 e = a.charCodeAt(j++), 9 f = c >> 2, 10 g = (3 & c) << 4 | d >> 4, 11 h = (15 & d) << 2 | e >> 6, 12 i = 63 & e, 13 isNaN(d) ? h = i = 64 : isNaN(e) && (i = 64), 14 b = b + _2.charAt(f) + _2.charAt(g) + _2.charAt(h) + _2.charAt(i); 15 return b 16 , 17 this.decode = function (a) 18 var c, d, e, f, g, h, i, b = "", 19 j = 0; 20 for (a = a.replace(/[^A-Za-z0-9\\+\\/\\=]/g, ""); j < a.length;) f = _2.indexOf(a.charAt(j++)), 21 g = _2.indexOf(a.charAt(j++)), 22 h = _2.indexOf(a.charAt(j++)), 23 i = _2.indexOf(a.charAt(j++)), 24 c = f << 2 | g >> 4, 25 d = (15 & g) << 4 | h >> 2, 26 e = (3 & h) << 6 | i, 27 b += String.fromCharCode(c), 28 64 != h && (b += String.fromCharCode(d)), 29 64 != i && (b += String.fromCharCode(e)); 30 return b = _27(b) 31 , 32 _29 = function (a) 33 var b, c, d; 34 for (a = a.replace(/\\r\\n/g, "\\n"), b = "", c = 0; c < a.length; c++) d = a.charCodeAt(c), 35 128 > d ? b += String.fromCharCode(d) : d > 127 && 2048 > d ? (b += String.fromCharCode(192 | d >> 6), b += String.fromCharCode(128 | 63 & d)) : (b += String.fromCharCode(224 | d >> 12), b += String.fromCharCode(128 | 63 & d >> 6), b += String.fromCharCode(128 | 63 & d)); 36 return b 37 , 38 _27 = function (a) 39 for (var b = "", c = 0, d = c1 = c2 = 0; c < a.length;) d = a.charCodeAt(c), 40 128 > d ? (b += String.fromCharCode(d), c++) : d > 191 && 224 > d ? (c2 = a.charCodeAt(c + 1), b += String.fromCharCode((31 & d) << 6 | 63 & c2), c += 2) : (c2 = a.charCodeAt(c + 1), c3 = a.charCodeAt(c + 2), b += String.fromCharCode((15 & d) << 12 | (63 & c2) << 6 | 63 & c3), c += 3); 41 return b 42 43 44 45 function hex_md5(a) 46 return binl2hex(core_md5(str2binl(a), a.length * chrsz)) 47 48 49 function b64_md5(a) 50 return binl2b64(core_md5(str2binl(a), a.length * chrsz)) 51 52 53 function str_md5(a) 54 return binl2str(core_md5(str2binl(a), a.length * chrsz)) 55 56 57 function hex_hmac_md5(a, b) 58 return binl2hex(core_hmac_md5(a, b)) 59 60 61 function b64_hmac_md5(a, b) 62 return binl2b64(core_hmac_md5(a, b)) 63 64 65 function str_hmac_md5(a, b) 66 return binl2str(core_hmac_md5(a, b)) 67 68 69 function md5_vm_test() 70 return "900150983cd24fb0d6963f7d28e17f72" == hex_md5("abc") 71 72 73 function core_md5(a, b) 74 var c, d, e, f, g, h, i, j, k; 75 for (a[b >> 5] |= 128 << b % 32, a[(b + 64 >>> 9 << 4) + 14] = b, c = 1732584193, d = -271733879, e = -1732584194, f = 271733878, g = 0; g < a.length; g += 16) h = c, 76 i = d, 77 j = e, 78 k = f, 79 c = md5_ff(c, d, e, f, a[g + 0], 7, -680876936), 80 f = md5_ff(f, c, d, e, a[g + 1], 12, -389564586), 81 e = md5_ff(e, f, c, d, a[g + 2], 17, 606105819), 82 d = md5_ff(d, e, f, c, a[g + 3], 22, -1044525330), 83 c = md5_ff(c, d, e, f, a[g + 4], 7, -176418897), 84 f = md5_ff(f, c, d, e, a[g + 5], 12, 1200080426), 85 e = md5_ff(e, f, c, d, a[g + 6], 17, -1473231341), 86 d = md5_ff(d, e, f, c, a[g + 7], 22, -45705983), 87 c = md5_ff(c, d, e, f, a[g + 8], 7, 1770035416), 88 f = md5_ff(f, c, d, e, a[g + 9], 12, -1958414417), 89 e = md5_ff(e, f, c, d, a[g + 10], 17, -42063), 90 d = md5_ff(d, e, f, c, a[g + 11], 22, -1990404162), 91 c = md5_ff(c, d, e, f, a[g + 12], 7, 1804603682), 92 f = md5_ff(f, c, d, e, a[g + 13], 12, -40341101), 93 e = md5_ff(e, f, c, d, a[g + 14], 17, -1502002290), 94 d = md5_ff(d, e, f, c, a[g + 15], 22, 1236535329), 95 c = md5_gg(c, d, e, f, a[g + 1], 5, -165796510), 96 f = md5_gg(f, c, d, e, a[g + 6], 9, -1069501632), 97 e = md5_gg(e, f, c, d, a[g + 11], 14, 643717713), 98 d = md5_gg(d, e, f, c, a[g + 0], 20, -373897302), 99 c = md5_gg(c, d, e, f, a[g + 5], 5, -701558691), 100 f = md5_gg(f, c, d, e, a[g + 10], 9, 38016083), 101 e = md5_gg(e, f, c, d, a[g + 15], 14, -660478335), 102 d = md5_gg(d, e, f, c, a[g + 4], 20, -405537848), 103 c = md5_gg(c, d, e, f, a[g + 9], 5, 568446438), 104 f = md5_gg(f, c, d, e, a[g + 14], 9, -1019803690), 105 e = md5_gg(e, f, c, d, a[g + 3], 14, -187363961), 106 d = md5_gg(d, e, f, c, a[g + 8], 20, 1163531501), 107 c = md5_gg(c, d, e, f, a[g + 13], 5, -1444681467), 108 f = md5_gg(f, c, d, e, a[g + 2], 9, -51403784), 109 e = md5_gg(e, f, c, d, a[g + 7], 14, 1735328473), 110 d = md5_gg(d, e, f, c, a[g + 12], 20, -1926607734), 111 c = md5_hh(c, d, e, f, a[g + 5], 4, -378558), 112 f = md5_hh(f, c, d, e, a[g + 8], 11, -2022574463), 113 e = md5_hh(e, f, c, d, a[g + 11], 16, 1839030562), 114 d = md5_hh(d, e, f, c, a[g + 14], 23, -35309556), 115 c = md5_hh(c, d, e, f, a[g + 1], 4, -1530992060), 116 f = md5_hh(f, c, d, e, a[g + 4], 11, 1272893353), 117 e = md5_hh(e, f, c, d, a[g + 7], 16, -155497632), 118 d = md5_hh(d, e, f, c, a[g + 10], 23, -1094730640), 119 c = md5_hh(c, d, e, f, a[g + 13], 4, 681279174), 120 f = md5_hh(f, c, d, e, a[g + 0], 11, -358537222), 121 e = md5_hh(e, f, c, d, a[g + 3], 16, -722521979), 122 d = md5_hh(d, e, f, c, a[g + 6], 23, 76029189), 123 c = md5_hh(c, d, e, f, a[g + 9], 4, -640364487), 124 f = md5_hh(f, c, d, e, a[g + 12], 11, -421815835), 125 e = md5_hh(e, f, c, d, a[g + 15], 16, 530742520), 126 d = md5_hh(d, e, f, c, a[g + 2], 23, -995338651), 127 c = md5_ii(c, d, e, f, a[g + 0], 6, -198630844), 128 f = md5_ii(f, c, d, e, a[g + 7], 10, 1126891415), 129 e = md5_ii(e, f, c, d, a[g + 14], 15, -1416354905), 130 d = md5_ii(d, e, f, c, a[g + 5], 21, -57434055), 131 c = md5_ii(c, d, e, f, a[g + 12], 6, 1700485571), 132 f = md5_ii(f, c, d, e, a[g + 3], 10, -1894986606), 133 e = md5_ii(e, f, c, d, a[g + 10], 15, -1051523), 134 d = md5_ii(d, e, f, c, a[g + 1], 21, -2054922799), 135 c = md5_ii(c, d, e, f, a[g + 8], 6, 1873313359), 136 f = md5_ii(f, c, d, e, a[g + 15], 10, -30611744), 137 e = md5_ii(e, f, c, d, a[g + 6], 15, -1560198380), 138 d = md5_ii(d, e, f, c, a[g + 13], 21, 1309151649), 139 c = md5_ii(c, d, e, f, a[g + 4], 6, -145523070), 140 f = md5_ii(f, c, d, e, a[g + 11], 10, -1120210379), 141 e = md5_ii(e, f, c, d, a[g + 2], 15, 718787259), 142 d = md5_ii(d, e, f, c, a[g + 9], 21, -343485551), 143 c = safe_add(c, h), 144 d = safe_add(d, i), 145 e = safe_add(e, j), 146 f = safe_add(f, k); 147 return Array(c, d, e, f) 148 149 150 function md5_cmn(a, b, c, d, e, f) 151 return safe_add(bit_rol(safe_add(safe_add(b, a), safe_add(d, f)), e), c) 152 153 154 function md5_ff(a, b, c, d, e, f, g) 155 return md5_cmn(b & c | ~b & d, a, b, e, f, g) 156 157 158 function md5_gg(a, b, c, d, e, f, g) 159 return md5_cmn(b & d | c & ~d, a, b, e, f, g) 160 161 162 function md5_hh(a, b, c, d, e, f, g) 163 return md5_cmn(b ^ c ^ d, a, b, e, f, g) 164 165 166 function md5_ii(a, b, c, d, e, f, g) 167 return md5_cmn(c ^ (b | ~d), a, b, e, f, g) 168 169 170 function core_hmac_md5(a, b) 171 var d, e, f, g, c = str2binl(a); 172 for (c.length > 16 && (c = core_md5(c, a.length * chrsz)), d = Array(16), e = Array(16), f = 0; 16 > f; f++) d[f] = 909522486 ^ c[f], 173 e[f] = 1549556828 ^ c[f]; 174 return g = core_md5(d.concat(str2binl(b)), 512 + b.length * chrsz), 175 core_md5(e.concat(g), 640) 176 177 178 function safe_add(a, b) 179 var c = (65535 & a) + (65535 & b), 180 d = (a >> 16) + (b >> 16) + (c >> 16); 181 return d << 16 | 65535 & c 182 183 184 function bit_rol(a, b) 185 return a << b | a >>> 32 - b 186 187 188 function str2binl(a) 189 var d, b = Array(), 190 c = (1 << chrsz) - 1; 191 for (d = 0; d < a.length * chrsz; d += chrsz) b[d >> 5] |= (a.charCodeAt(d / chrsz) & c) << d % 32; 192 return b 193 194 195 function binl2str(a) 196 var d, b = "", 197 c = (1 << chrsz) - 1; 198 for (d = 0; d < 32 * a.length; d += chrsz) b += String.fromCharCode(a[d >> 5] >>> d % 32 & c); 199 return b 200 201 202 function binl2hex(a) 203 var d, b = hexcase ? "0123456789ABCDEF" : "0123456789abcdef", 204 c = ""; 205 for (d = 0; d < 4 * a.length; d++) c += b.charAt(15 & a[d >> 2] >> 8 * (d % 4) + 4) + b.charAt(15 & a[d >> 2] >> 8 * (d % 4)); 206 return c 207 208 209 function binl2b64(a) 210 var d, e, f, b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", 211 c = ""; 212 for (d = 0; d < 4 * a.length; d += 3) for (e = (255 & a[d >> 2] >> 8 * (d % 4)) << 16 | (255 & a[d + 1 >> 2] >> 8 * ((d + 1) % 4)) << 8 | 255 & a[d + 2 >> 2] >> 8 * ((d + 2) % 4), f = 0; 4 > f; f++) c += 8 * d + 6 * f > 32 * a.length ? b64pad : b.charAt(63 & e >> 6 * (3 - f)); 213 return c 214 215 216 function encode_param(a) 217 var b = new Base64; 218 return b.encode(a) 219 220 221 function encode_secret() 222 var b, a = appId; 223 for (b = 0; b < arguments.length; b++) a += arguments[b]; 224 return a = a.replace(/\\s/g, ""), 225 hex_md5(a) 226 227 228 function decode_result(a) 229 var b = new Base64; 230 return b.decode(b.decode(b.decode(a))) 231 232 233 var hexcase = 0, 234 b64pad = "", 235 chrsz = 8, 236 appId = "a01901d3caba1f362d69474674ce477f"; 237 var hexcase = 0; 238 var b64pad = ""; 239 240 function hex_md5(s) 241 return rstr2hex(rstr_md5(str2rstr_utf8(s))) 242 243 244 function b64_md5(s) 245 return rstr2b64(rstr_md5(str2rstr_utf8(s))) 246 247 248 function any_md5(s, e) 249 return rstr2any(rstr_md5(str2rstr_utf8(s)), e) 250 251 252 function hex_hmac_md5(k, d) 253 return rstr2hex(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d))) 254 255 256 function b64_hmac_md5(k, d) 257 return rstr2b64(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d))) 258 259 260 function any_hmac_md5(k, d, e) 261 return rstr2any(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d)), e) 262 263 264 function md5_vm_test() 265 return hex_md5("abc").toLowerCase() == "900150983cd24fb0d6963f7d28e17f72" 266 267 268 function rstr_md5(s) 269 return binl2rstr(binl_md5(rstr2binl(s), s.length * 8)) 270 271 272 function rstr_hmac_md5(key, data) 273 var bkey = rstr2binl(key); 274 if (bkey.length > 16) bkey = binl_md5(bkey, key.length * 8); 275 var ipad = Array(16), 276 opad = Array(16); 277 for (var i = 0; i < 16; i++) 278 ipad[i] = bkey[i] ^ 0x36363636; 279 opad[i] = bkey[i] ^ 0x5C5C5C5C 280 281 var hash = binl_md5(ipad.concat(rstr2binl(data)), 512 + data.length * 8); 282 return binl2rstr(binl_md5(opad.concat(hash), 512 + 128)) 283 284 285 function rstr2hex(input) 286 try 287 hexcase 288 catch (e) 289 hexcase = 0 290 291 var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; 292 var output = ""; 293 var x; 294 for (var i = 0; i < input.length; i++) 295 x = input.charCodeAt(i); 296 output += hex_tab.charAt((x >>> 4) & 0x0F) + hex_tab.charAt(x & 0x0F) 297 298 return output 299 300 301 function rstr2b64(input) 302 try 303 b64pad 304 catch (e) 305 b64pad = ‘‘ 306 307 var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 308 var output = ""; 309 var len = input.length; 310 for (var i = 0; i < len; i += 3) 311 var triplet = (input.charCodeAt(i) << 16) | (i + 1 < len ? input.charCodeAt(i + 1) << 8 : 0) | (i + 2 < len ? input.charCodeAt(i + 2) : 0); 312 for (var j = 0; j < 4; j++) 313 if (i * 8 + j * 6 > input.length * 8) output += b64pad; 314 else output += tab.charAt((triplet >>> 6 * (3 - j)) & 0x3F) 315 316 317 return output 318 319 320 function rstr2any(input, encoding) 321 var divisor = encoding.length; 322 var i, j, q, x, quotient; 323 var dividend = Array(Math.ceil(input.length / 2)); 324 for (i = 0; i < dividend.length; i++) 325 dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1) 326 327 var full_length = Math.ceil(input.length * 8 / (Math.log(encoding.length) / Math.log(2))); 328 var remainders = Array(full_length); 329 for (j = 0; j < full_length; j++) 330 quotient = Array(); 331 x = 0; 332 for (i = 0; i < dividend.length; i++) 333 x = (x << 16) + dividend[i]; 334 q = Math.floor(x / divisor); 335 x -= q * divisor; 336 if (quotient.length > 0 || q > 0) quotient[quotient.length] = q 337 338 remainders[j] = x; 339 dividend = quotient 340 341 var output = ""; 342 for (i = remainders.length - 1; i >= 0; i--) output += encoding.charAt(remainders[i]); 343 return output 344 345 346 function str2rstr_utf8(input) 347 var output = ""; 348 var i = -1; 349 var x, y; 350 while (++i < input.length) 351 x = input.charCodeAt(i); 352 y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0; 353 if (0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) 354 x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF); 355 i++ 356 357 if (x <= 0x7F) output += String.fromCharCode(x); 358 else if (x <= 0x7FF) output += String.fromCharCode(0xC0 | ((x >>> 6) & 0x1F), 0x80 | (x & 0x3F)); 359 else if (x <= 0xFFFF) output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F), 0x80 | ((x >>> 6) & 0x3F), 0x80 | (x & 0x3F)); 360 else if (x <= 0x1FFFFF) output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07), 0x80 | ((x >>> 12) & 0x3F), 0x80 | ((x >>> 6) & 0x3F), 0x80 | (x & 0x3F)) 361 362 return output 363 364 365 function str2rstr_utf16le(input) 366 var output = ""; 367 for (var i = 0; i < input.length; i++) output += String.fromCharCode(input.charCodeAt(i) & 0xFF, (input.charCodeAt(i) >>> 8) & 0xFF); 368 return output 369 370 371 function str2rstr_utf16be(input) 372 var output = ""; 373 for (var i = 0; i < input.length; i++) output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF, input.charCodeAt(i) & 0xFF); 374 return output 375 376 377 function rstr2binl(input) 378 var output = Array(input.length >> 2); 379 for (var i = 0; i < output.length; i++) output[i] = 0; 380 for (var i = 0; i < input.length * 8; i += 8) output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (i % 32); 381 return output 382 383 384 function binl2rstr(input) 385 var output = ""; 386 for (var i = 0; i < input.length * 32; i += 8) output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xFF); 387 return output 388 389 390 function binl_md5(x, len) 391 x[len >> 5] |= 0x80 << ((len) % 32); 392 x[(((len + 64) >>> 9) << 4) + 14] = len; 393 var a = 1732584193; 394 var b = -271733879; 395 var c = -1732584194; 396 var d = 271733878; 397 for (var i = 0; i < x.length; i += 16) 398 var olda = a; 399 var oldb = b; 400 var oldc = c; 401 var oldd = d; 402 a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936); 403 d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586); 404 c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819); 405 b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330); 406 a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897); 407 d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426); 408 c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341); 409 b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983); 410 a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416); 411 d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417); 412 c = md5_ff(c, d, a, b, x[i + 10], 17, -42063); 413 b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162); 414 a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682); 415 d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101); 416 c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290); 417 b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329); 418 a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510); 419 d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632); 420 c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713); 421 b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302); 422 a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691); 423 d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083); 424 c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335); 425 b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848); 426 a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438); 427 d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690); 428 c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961); 429 b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501); 430 a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467); 431 d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784); 432 c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473); 433 b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734); 434 a = md5_hh(a, b, c, d, x[i + 5], 4, -378558); 435 d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463); 436 c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562); 437 b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556); 438 a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060); 439 d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353); 440 c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632); 441 b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640); 442 a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174); 443 d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222); 444 c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979); 445 b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189); 446 a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487); 447 d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835); 448 c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520); 449 b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651); 450 a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844); 451 d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415); 452 c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905); 453 b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055); 454 a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571); 455 d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606); 456 c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523); 457 b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799); 458 a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359); 459 d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744); 460 c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380); 461 b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649); 462 a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070); 463 d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379); 464 c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259); 465 b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551); 466 a = safe_add(a, olda); 467 b = safe_add(b, oldb); 468 c = safe_add(c, oldc); 469 d = safe_add(d, oldd) 470 471 return Array(a, b, c, d) 472 473 474 function md5_cmn(q, a, b, x, s, t) 475 return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b) 476 477 478 function md5_ff(a, b, c, d, x, s, t) 479 return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t) 480 481 482 function md5_gg(a, b, c, d, x, s, t) 483 return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t) 484 485 486 function md5_hh(a, b, c, d, x, s, t) 487 return md5_cmn(b ^ c ^ d, a, b, x, s, t) 488 489 490 function md5_ii(a, b, c, d, x, s, t) 491 return md5_cmn(c ^ (b | (~d)), a, b, x, s, t) 492 493 494 function safe_add(x, y) 495 var lsw = (x & 0xFFFF) + (y & 0xFFFF); 496 var msw = (x >> 16) + (y >> 16) + (lsw >> 16); 497 return (msw << 16) | (lsw & 0xFFFF) 498 499 500 function bit_rol(num, cnt) 501 return (num << cnt) | (num >>> (32 - cnt)) 502 503 504 var CryptoJS = CryptoJS || 505 function (h, r) 506 var k = , 507 l = k.lib = , 508 n = function () 509 , 510 f = l.Base = 511 extend: function (a) 512 n.prototype = this; 513 var b = new n; 514 a && b.mixIn(a); 515 b.hasOwnProperty("init") || (b.init = function () 516 b.s.init.apply(this, arguments) 517 ); 518 b.init.prototype = b; 519 b.s = this; 520 return b 521 , 522 create: function () 523 var a = this.extend(); 524 a.init.apply(a, arguments); 525 return a 526 , 527 init: function () 528 , 529 mixIn: function (a) 530 for (var b in a) a.hasOwnProperty(b) && (this[b] = a[b]); 531 a.hasOwnProperty("toString") && (this.toString = a.toString) 532 , 533 clone: function () 534 return this.init.prototype.extend(this) 535 536 , 537 j = l.WordArray = f.extend( 538 init: function (a, b) 539 a = this.words = a || []; 540 this.sigBytes = b != r ? b : 4 * a.length 541 , 542 toString: function (a) 543 return (a || s).stringify(this) 544 , 545 concat: function (a) 546 var b = this.words, 547 d = a.words, 548 c = this.sigBytes; 549 a = a.sigBytes; 550 this.clamp(); 551 if (c % 4) for (var e = 0; e < a; e++) b[c + e >>> 2] |= (d[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 24 - 8 * ((c + e) % 4); 552 else if (65535 < d.length) for (e = 0; e < a; e += 4) b[c + e >>> 2] = d[e >>> 2]; 553 else b.push.apply(b, d); 554 this.sigBytes += a; 555 return this 556 , 557 clamp: function () 558 var a = this.words, 559 b = this.sigBytes; 560 a[b >>> 2] &= 4294967295 << 32 - 8 * (b % 4); 561 a.length = h.ceil(b / 4) 562 , 563 clone: function () 564 var a = f.clone.call(this); 565 a.words = this.words.slice(0); 566 return a 567 , 568 random: function (a) 569 for (var b = [], d = 0; d < a; d += 4) b.push(4294967296 * h.random() | 0); 570 return new j.init(b, a) 571 572 ), 573 m = k.enc = , 574 s = m.Hex = 575 stringify: function (a) 576 var b = a.words; 577 a = a.sigBytes; 578 for (var d = [], c = 0; c < a; c++) 579 var e = b[c >>> 2] >>> 24 - 8 * (c % 4) & 255; 580 d.push((e >>> 4).toString(16)); 581 d.push((e & 15).toString(16)) 582 583 return d.join("") 584 , 585 parse: function (a) 586 for (var b = a.length, d = [], c = 0; c < b; c += 2) d[c >>> 3] |= parseInt(a.substr(c, 2), 16) << 24 - 4 * (c % 8); 587 return new j.init(d, b / 2) 588 589 , 590 p = m.Latin1 = 591 stringify: function (a) 592 var b = a.words; 593 a = a.sigBytes; 594 for (var d = [], c = 0; c < a; c++) d.push(String.fromCharCode(b[c >>> 2] >>> 24 - 8 * (c % 4) & 255)); 595 return d.join("") 596 , 597 parse: function (a) 598 for (var b = a.length, d = [], c = 0; c < b; c++) d[c >>> 2] |= (a.charCodeAt(c) & 255) << 24 - 8 * (c % 4); 599 return new j.init(d, b) 600 601 , 602 t = m.Utf8 = 603 stringify: function (a) 604 try 605 return decodeURIComponent(escape(p.stringify(a))) 606 catch (b) 607 throw Error("Malformed UTF-8 data") 608 609 , 610 parse: function (a) 611 return p.parse(unescape(encodeURIComponent(a))) 612 613 , 614 q = l.BufferedBlockAlgorithm = f.extend( 615 reset: function () 616 this._3 = new j.init; 617 this._19 = 0 618 , 619 _11: function (a) 620 "string" == typeof a && (a = t.parse(a)); 621 this._3.concat(a); 622 this._19 += a.sigBytes 623 , 624 _4: function (a) 625 var b = this._3, 626 d = b.words, 627 c = b.sigBytes, 628 e = this.blockSize, 629 f = c / (4 * e), 630 f = a ? h.ceil(f) : h.max((f | 0) - this._20, 0); 631 a = f * e; 632 c = h.min(4 * a, c); 633 if (a) 634 for (var g = 0; g < a; g += e) this._23(d, g); 635 g = d.splice(0, a); 636 b.sigBytes -= c 637 638 return new j.init(g, c) 639 , 640 clone: function () 641 var a = f.clone.call(this); 642 a._3 = this._3.clone(); 643 return a 644 , 645 _20: 0 646 ); 647 l.Hasher = q.extend( 648 cfg: f.extend(), 649 init: function (a) 650 this.cfg = this.cfg.extend(a); 651 this.reset() 652 , 653 reset: function () 654 q.reset.call(this); 655 this._7() 656 , 657 update: function (a) 658 this._11(a); 659 this._4(); 660 return this 661 , 662 finalize: function (a) 663 a && this._11(a); 664 return this._10() 665 , 666 blockSize: 16, 667 _5: function (a) 668 return function (b, d) 669 return (new a.init(d)).finalize(b) 670 671 , 672 _30: function (a) 673 return function (b, d) 674 return (new u.HMAC.init(a, d)).finalize(b) 675 676 677 ); 678 var u = k.algo = ; 679 return k 680 (Math); 681 (function () 682 var h = CryptoJS, 683 j = h.lib.WordArray; 684 h.enc.Base64 = 685 stringify: function (b) 686 var e = b.words, 687 f = b.sigBytes, 688 c = this._17; 689 b.clamp(); 690 b = []; 691 for (var a = 0; a < f; a += 3) for (var d = (e[a >>> 2] >>> 24 - 8 * (a % 4) & 255) << 16 | (e[a + 1 >>> 2] >>> 24 - 8 * ((a + 1) % 4) & 255) << 8 | e[a + 2 >>> 2] >>> 24 - 8 * ((a + 2) % 4) & 255, g = 0; 4 > g && a + 0.75 * g < f; g++) b.push(c.charAt(d >>> 6 * (3 - g) & 63)); 692 if (e = c.charAt(64)) for (; b.length % 4;) b.push(e); 693 return b.join("") 694 , 695 parse: function (b) 696 var e = b.length, 697 f = this._17, 698 c = f.charAt(64); 699 c && (c = b.indexOf(c), -1 != c && (e = c)); 700 for (var c = [], a = 0, d = 0; d < e; d++) if (d % 4) 701 var g = f.indexOf(b.charAt(d - 1)) << 2 * (d % 4), 702 h = f.indexOf(b.charAt(d)) >>> 6 - 2 * (d % 4); 703 c[a >>> 2] |= (g | h) << 24 - 8 * (a % 4); 704 a++ 705 706 return j.create(c, a) 707 , 708 _17: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" 709 710 )(); 711 CryptoJS.lib.Cipher || 712 function (u) 713 var g = CryptoJS, 714 f = g.lib, 715 k = f.Base, 716 l = f.WordArray, 717 q = f.BufferedBlockAlgorithm, 718 r = g.enc.Base64, 719 v = g.algo.EvpKDF, 720 n = f.Cipher = q.extend( 721 cfg: k.extend(), 722 createEncryptor: function (a, b) 723 return this.create(this._12, a, b) 724 , 725 createDecryptor: function (a, b) 726 return this.create(this._33, a, b) 727 , 728 init: function (a, b, c) 729 this.cfg = this.cfg.extend(c); 730 this._16 = a; 731 this._13 = b; 732 this.reset() 733 , 734 reset: function () 735 q.reset.call(this); 736 this._7() 737 , 738 process: function (a) 739 this._11(a); 740 return this._4() 741 , 742 finalize: function (a) 743 a && this._11(a); 744 return this._10() 745 , 746 keySize: 4, 747 ivSize: 4, 748 _12: 1, 749 _33: 2, 750 _5: function (a) 751 return 752 encrypt: function (b, c, d) 753 return ("string" == typeof c ? s : j).encrypt(a, b, c, d) 754 , 755 decrypt: function (b, c, d) 756 return ("string" == typeof c ? s : j).decrypt(a, b, c, d) 757 758 759 760 ); 761 f.StreamCipher = n.extend( 762 _10: function () 763 return this._4(!0) 764 , 765 blockSize: 1 766 ); 767 var m = g.mode = , 768 t = function (a, b, c) 769 var d = this._18; 770 d ? this._18 = u : d = this._14; 771 for (var e = 0; e < c; e++) a[b + e] ^= d[e] 772 , 773 h = (f.BlockCipherMode = k.extend( 774 createEncryptor: function (a, b) 775 return this.Encryptor.create(a, b) 776 , 777 createDecryptor: function (a, b) 778 return this.Decryptor.create(a, b) 779 , 780 init: function (a, b) 781 this._8 = a; 782 this._18 = b 783 784 )).extend(); 785 h.Encryptor = h.extend( 786 processBlock: function (a, b) 787 var c = this._8, 788 d = c.blockSize; 789 t.call(this, a, b, d); 790 c.encryptBlock(a, b); 791 this._14 = a.slice(b, b + d) 792 793 ); 794 h.Decryptor = h.extend( 795 processBlock: function (a, b) 796 var c = this._8, 797 d = c.blockSize, 798 e = a.slice(b, b + d); 799 c.decryptBlock(a, b); 800 t.call(this, a, b, d); 801 this._14 = e 802 803 ); 804 m = m.CBC = h; 805 h = (g.pad = ).Pkcs7 = 806 pad: function (a, b) 807 for (var c = 4 * b, c = c - a.sigBytes % c, d = c << 24 | c << 16 | c << 8 | c, e = [], f = 0; f < c; f += 4) e.push(d); 808 c = l.create(e, c); 809 a.concat(c) 810 , 811 unpad: function (a) 812 a.sigBytes -= a.words[a.sigBytes - 1 >>> 2] & 255 813 814 ; 815 f.BlockCipher = n.extend( 816 cfg: n.cfg.extend( 817 mode: m, 818 padding: h 819 ), 820 reset: function () 821 n.reset.call(this); 822 var a = this.cfg, 823 b = a.iv, 824 a = a.mode; 825 if (this._16 == this._12) var c = a.createEncryptor; 826 else c = a.createDecryptor, 827 this._20 = 1; 828 this._31 = c.call(a, this, b && b.words) 829 , 830 _23: function (a, b) 831 this._31.processBlock(a, b) 832 , 833 _10: function () 834 var a = this.cfg.padding; 835 if (this._16 == this._12) 836 a.pad(this._3, this.blockSize); 837 var b = this._4(!0) 838 else b = this._4(!0), 839 a.unpad(b); 840 return b 841 , 842 blockSize: 4 843 ); 844 var p = f.CipherParams = k.extend( 845 init: function (a) 846 this.mixIn(a) 847 , 848 toString: function (a) 849 return (a || this.formatter).stringify(this) 850 851 ), 852 m = (g.format = ).OpenSSL = 853 stringify: function (a) 854 var b = a.ciphertext; 855 a = a.salt; 856 return (a ? l.create([1398893684, 1701076831]).concat(a).concat(b) : b).toString(r) 857 , 858 parse: function (a) 859 a = r.parse(a); 860 var b = a.words; 861 if (1398893684 == b[0] && 1701076831 == b[1]) 862 var c = l.create(b.slice(2, 4)); 863 b.splice(0, 4); 864 a.sigBytes -= 16 865 866 return p.create( 867 ciphertext: a, 868 salt: c 869 ) 870 871 , 872 j = f.SerializableCipher = k.extend( 873 cfg: k.extend( 874 format: m 875 ), 876 encrypt: function (a, b, c, d) 877 d = this.cfg.extend(d); 878 var e = a.createEncryptor(c, d); 879 b = e.finalize(b); 880 e = e.cfg; 881 return p.create( 882 ciphertext: b, 883 key: c, 884 iv: e.iv, 885 algorithm: a, 886 mode: e.mode, 887 padding: e.padding, 888 blockSize: a.blockSize, 889 formatter: d.format 890 ) 891 , 892 decrypt: function (a, b, c, d) 893 d = this.cfg.extend(d); 894 b = this._15(b, d.format); 895 return a.createDecryptor(c, d).finalize(b.ciphertext) 896 , 897 _15: function (a, b) 898 return "string" == typeof a ? b.parse(a, this) : a 899 900 ), 901 g = (g.kdf = ).OpenSSL = 902 execute: function (a, b, c, d) 903 d || (d = l.random(8)); 904 a = v.create( 905 keySize: b + c 906 ).compute(a, d); 907 c = l.create(a.words.slice(b), 4 * c); 908 a.sigBytes = 4 * b; 909 return p.create( 910 key: a, 911 iv: c, 912 salt: d 913 ) 914 915 , 916 s = f.PasswordBasedCipher = j.extend( 917 cfg: j.cfg.extend( 918 kdf: g 919 ), 920 encrypt: function (a, b, c, d) 921 d = this.cfg.extend(d); 922 c = d.kdf.execute(c, a.keySize, a.ivSize); 923 d.iv = c.iv; 924 a = j.encrypt.call(this, a, b, c.key, d); 925 a.mixIn(c); 926 return a 927 , 928 decrypt: function (a, b, c, d) 929 d = this.cfg.extend(d); 930 b = this._15(b, d.format); 931 c = d.kdf.execute(c, a.keySize, a.ivSize, b.salt); 932 d.iv = c.iv; 933 return j.decrypt.call(this, a, b, c.key, d) 934 935 ) 936 (); 937 CryptoJS.mode.ECB = function () 938 var a = CryptoJS.lib.BlockCipherMode.extend(); 939 a.Encryptor = a.extend( 940 processBlock: function (a, b) 941 this._8.encryptBlock(a, b) 942 943 ); 944 a.Decryptor = a.extend( 945 processBlock: function (a, b) 946 this._8.decryptBlock(a, b) 947 948 ); 949 return a 950 (); 951 (function (E) 952 function h(a, f, g, j, p, h, k) 953 a = a + (f & g | ~f & j) + p + k; 954 return (a << h | a >>> 32 - h) + f 955 956 957 function k(a, f, g, j, p, h, k) 958 a = a + (f & j | g & ~j) + p + k; 959 return (a << h | a >>> 32 - h) + f 960 961 962 function l(a, f, g, j, h, k, l) 963 a = a + (f ^ g ^ j) + h + l; 964 return (a << k | a >>> 32 - k) + f 965 966 967 function n(a, f, g, j, h, k, l) 968 a = a + (g ^ (f | ~j)) + h + l; 969 return (a << k | a >>> 32 - k) + f 970 971 972 for (var r = CryptoJS, q = r.lib, F = q.WordArray, s = q.Hasher, q = r.algo, a = [], t = 0; 64 > t; t++) a[t] = 4294967296 * E.abs(E.sin(t + 1)) | 0; 973 q = q.MD5 = s.extend( 974 _7: function () 975 this._9 = new F.init([1732584193, 4023233417, 2562383102, 271733878]) 976 , 977 _23: function (m, f) 978 for (var g = 0; 16 > g; g++) 979 var j = f + g, 980 p = m[j]; 981 m[j] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360 982 983 var g = this._9.words, 984 j = m[f + 0], 985 p = m[f + 1], 986 q = m[f + 2], 987 r = m[f + 3], 988 s = m[f + 4], 989 t = m[f + 5], 990 u = m[f + 6], 991 v = m[f + 7], 992 w = m[f + 8], 993 x = m[f + 9], 994 y = m[f + 10], 995 z = m[f + 11], 996 A = m[f + 12], 997 B = m[f + 13], 998 C = m[f + 14], 999 D = m[f + 15], 1000 b = g[0], 1001 c = g[1], 1002 d = g[2], 1003 e = g[3], 1004 b = h(b, c, d, e, j, 7, a[0]), 1005 e = h(e, b, c, d, p, 12, a[1]), 1006 d = h(d, e, b, c, q, 17, a[2]), 1007 c = h(c, d, e, b, r, 22, a[3]), 1008 b = h(b, c, d, e, s, 7, a[4]), 1009 e = h(e, b, c, d, t, 12, a[5]), 1010 d = h(d, e, b, c, u, 17, a[6]), 1011 c = h(c, d, e, b, v, 22, a[7]), 1012 b = h(b, c, d, e, w, 7, a[8]), 1013 e = h(e, b, c, d, x, 12, a[9]), 1014 d = h(d, e, b, c, y, 17, a[10]), 1015 c = h(c, d, e, b, z, 22, a[11]), 1016 b = h(b, c, d, e, A, 7, a[12]), 1017 e = h(e, b, c, d, B, 12, a[13]), 1018 d = h(d, e, b, c, C, 17, a[14]), 1019 c = h(c, d, e, b, D, 22, a[15]), 1020 b = k(b, c, d, e, p, 5, a[16]), 1021 e = k(e, b, c, d, u, 9, a[17]), 1022 d = k(d, e, b, c, z, 14, a[18]), 1023 c = k(c, d, e, b, j, 20, a[19]), 1024 b = k(b, c, d, e, t, 5, a[20]), 1025 e = k(e, b, c, d, y, 9, a[21]), 1026 d = k(d, e, b, c, D, 14, a[22]), 1027 c = k(c, d, e, b, s, 20, a[23]), 1028 b = k(b, c, d, e, x, 5, a[24]), 1029 e = k(e, b, c, d, C, 9, a[25]), 1030 d = k(d, e, b, c, r, 14, a[26]), 1031 c = k(c, d, e, b, w, 20, a[27]), 1032 b = k(b, c, d, e, B, 5, a[28]), 1033 e = k(e, b, c, d, q, 9, a[29]), 1034 d = k(d, e, b, c, v, 14, a[30]), 1035 c = k(c, d, e, b, A, 20, a[31]), 1036 b = l(b, c, d, e, t, 4, a[32]), 1037 e = l(e, b, c, d, w, 11, a[33]), 1038 d = l(d, e, b, c, z, 16, a[34]), 1039 c = l(c, d, e, b, C, 23, a[35]), 1040 b = l(b, c, d, e, p, 4, a[36]), 1041 e = l(e, b, c, d, s, 11, a[37]), 1042 d = l(d, e, b, c, v, 16, a[38]), 1043 c = l(c, d, e, b, y, 23, a[39]), 1044 b = l(b, c, d, e, B, 4, a[40]), 1045 e = l(e, b, c, d, j, 11, a[41]), 1046 d = l(d, e, b, c, r, 16, a[42]), 1047 c = l(c, d, e, b, u, 23, a[43]), 1048 b = l(b, c, d, e, x, 4, a[44]), 1049 e = l(e, b, c, d, A, 11, a[45]), 1050 d = l(d, e, b, c, D, 16, a[46]), 1051 c = l(c, d, e, b, q, 23, a[47]), 1052 b = n(b, c, d, e, j, 6, a[48]), 1053 e = n(e, b, c, d, v, 10, a[49]), 1054 d = n(d, e, b, c, C, 15, a[50]), 1055 c = n(c, d, e, b, t, 21, a[51]), 1056 b = n(b, c, d, e, A, 6, a[52]), 1057 e = n(e, b, c, d, r, 10, a[53]), 1058 d = n(d, e, b, c, y, 15, a[54]), 1059 c = n(c, d, e, b, p, 21, a[55]), 1060 b = n(b, c, d, e, w, 6, a[56]), 1061 e = n(e, b, c, d, D, 10, a[57]), 1062 d = n(d, e, b, c, u, 15, a[58]), 1063 c = n(c, d, e, b, B, 21, a[59]), 1064 b = n(b, c, d, e, s, 6, a[60]), 1065 e = n(e, b, c, d, z, 10, a[61]), 1066 d = n(d, e, b, c, q, 15, a[62]), 1067 c = n(c, d, e, b, x, 21, a[63]); 1068 g[0] = g[0] + b | 0; 1069 g[1] = g[1] + c | 0; 1070 g[2] = g[2] + d | 0; 1071 g[3] = g[3] + e | 0 1072 , 1073 _10: function () 1074 var a = this._3, 1075 f = a.words, 1076 g = 8 * this._19, 1077 j = 8 * a.sigBytes; 1078 f[j >>> 5] |= 128 << 24 - j % 32; 1079 var h = E.floor(g / 4294967296); 1080 f[(j + 64 >>> 9 << 4) + 15] = (h << 8 | h >>> 24) & 16711935 | (h << 24 | h >>> 8) & 4278255360; 1081 f[(j + 64 >>> 9 << 4) + 14] = (g << 8 | g >>> 24) & 16711935 | (g << 24 | g >>> 8) & 4278255360; 1082 a.sigBytes = 4 * (f.length + 1); 1083 this._4(); 1084 a = this._9; 1085 f = a.words; 1086 for (g = 0; 4 > g; g++) j = f[g], 1087 f[g] = (j << 8 | j >>> 24) & 16711935 | (j << 24 | j >>> 8) & 4278255360; 1088 return a 1089 , 1090 clone: function () 1091 var a = s.clone.call(this); 1092 a._9 = this._9.clone(); 1093 return a 1094 1095 ); 1096 r.MD5 = s._5(q); 1097 r.HmacMD5 = s._30(q) 1098 )(Math); 1099 (function () 1100 for (var q = CryptoJS, x = q.lib.BlockCipher, r = q.algo, j = [], y = [], z = [], A = [], B = [], C = [], s = [], u = [], v = [], w = [], g = [], k = 0; 256 > k; k++) g[k] = 128 > k ? k << 1 : k << 1 ^ 283; 1101 for (var n = 0, l = 0, k = 0; 256 > k; k++) 1102 var f = l ^ l << 1 ^ l << 2 ^ l << 3 ^ l << 4, 1103 f = f >>> 8 ^ f & 255 ^ 99; 1104 j[n] = f; 1105 y[f] = n; 1106 var t = g[n], 1107 D = g[t], 1108 E = g[D], 1109 b = 257 * g[f] ^ 16843008 * f; 1110 z[n] = b << 24 | b >>> 8; 1111 A[n] = b << 16 | b >>> 16; 1112 B[n] = b << 8 | b >>> 24; 1113 C[n] = b; 1114 b = 16843009 * E ^ 65537 * D ^ 257 * t ^ 16843008 * n; 1115 s[f] = b << 24 | b >>> 8; 1116 u[f] = b << 16 | b >>> 16; 1117 v[f] = b << 8 | b >>> 24; 1118 w[f] = b; 1119 n ? (n = t ^ g[g[g[E ^ t]]], l ^= g[g[l]]) : n = l = 1 1120 1121 var F = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], 1122 r = r.AES = x.extend( 1123 _7: function () 1124 for (var c = this._13, e = c.words, a = c.sigBytes / 4, c = 4 * ((this._26 = a + 6) + 1), b = this._32 = [], h = 0; h < c; h++) if (h < a) b[h] = e[h]; 1125 else 1126 var d = b[h - 1]; 1127 h % a ? 6 < a && 4 == h % a && (d = j[d >>> 24] << 24 | j[d >>> 16 & 255] << 16 | j[d >>> 8 & 255] << 8 | j[d & 255]) : (d = d << 8 | d >>> 24, d = j[d >>> 24] << 24 | j[d >>> 16 & 255] << 16 | j[d >>> 8 & 255] << 8 | j[d & 255], d ^= F[h / a | 0] << 24); 1128 b[h] = b[h - a] ^ d 1129 1130 e = this._34 = []; 1131 for (a = 0; a < c; a++) h = c - a, 1132 d = a % 4 ? b[h] : b[h - 4], 1133 e[a] = 4 > a || 4 >= h ? d : s[j[d >>> 24]] ^ u[j[d >>> 16 & 255]] ^ v[j[d >>> 8 & 255]] ^ w[j[d & 255]] 1134 , 1135 encryptBlock: function (c, e) 1136 this._6(c, e, this._32, z, A, B, C, j) 1137 , 1138 decryptBlock: function (c, e) 1139 var a = c[e + 1]; 1140 c[e + 1] = c[e + 3]; 1141 c[e + 3] = a; 1142 this._6(c, e, this._34, s, u, v, w, y); 1143 a = c[e + 1]; 1144 c[e + 1] = c[e + 3]; 1145 c[e + 3] = a 1146 , 1147 _6: function (c, e, a, b, h, d, j, m) 1148 for (var n = this._26, f = c[e] ^ a[0], g = c[e + 1] ^ a[1], k = c[e + 2] ^ a[2], p = c[e + 3] ^ a[3], l = 4, t = 1; t < n; t++) var q = b[f >>> 24] ^ h[g >>> 16 & 255] ^ d[k >>> 8 & 255] ^ j[p & 255] ^ a[l++], 1149 r = b[g >>> 24] ^ h[k >>> 16 & 255] ^ d[p >>> 8 & 255] ^ j[f & 255] ^ a[l++], 1150 s = b[k >>> 24] ^ h[p >>> 16 & 255] ^ d[f >>> 8 & 255] ^ j[g & 255] ^ a[l++], 1151 p = b[p >>> 24] ^ h[f >>> 16 & 255] ^ d[g >>> 8 & 255] ^ j[k & 255] ^ a[l++], 1152 f = q, 1153 g = r, 1154 k = s; 1155 q = (m[f >>> 24] << 24 | m[g >>> 16 & 255] << 16 | m[k >>> 8 & 255] << 8 | m[p & 255]) ^ a[l++]; 1156 r = (m[g >>> 24] << 24 | m[k >>> 16 & 255] << 16 | m[p >>> 8 & 255] << 8 | m[f & 255]) ^ a[l++]; 1157 s = (m[k >>> 24] << 24 | m[p >>> 16 & 255] << 16 | m[f >>> 8 & 255] << 8 | m[g & 255]) ^ a[l++]; 1158 p = (m[p >>> 24] << 24 | m[f >>> 16 & 255] << 16 | m[g >>> 8 & 255] << 8 | m[k & 255]) ^ a[l++]; 1159 c[e] = q; 1160 c[e + 1] = r; 1161 c[e + 2] = s; 1162 c[e + 3] = p 1163 , 1164 keySize: 8 1165 ); 1166 q.AES = x._5(r) 1167 )(); 1168 (function () 1169 function j(b, c) 1170 var a = (this._0 >>> b ^ this._1) & c; 1171 this._1 ^= a; 1172 this._0 ^= a << b 1173 1174 1175 function l(b, c) 1176 var a = (this._1 >>> b ^ this._0) & c; 1177 this._0 ^= a; 1178 this._1 ^= a << b 1179 1180 1181 var h = CryptoJS, 1182 e = h.lib, 1183 n = e.WordArray, 1184 e = e.BlockCipher, 1185 g = h.algo, 1186 q = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], 1187 p = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], 1188 r = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], 1189 s = [ 1190 "0": 8421888, 1191 268435456: 32768, 1192 536870912: 8421378, 1193 805306368: 2, 1194 1073741824: 512, 1195 1342177280: 8421890, 1196 1610612736: 8389122, 1197 1879048192: 8388608, 1198 2147483648: 514, 1199 2415919104: 8389120, 1200 2684354560: 33280, 1201 2952790016: 8421376, 1202 3221225472: 32770, 1203 3489660928: 8388610, 1204 3758096384: 0, 1205 4026531840: 33282, 1206 134217728: 0, 1207 402653184: 8421890, 1208 671088640: 33282, 1209 939524096: 32768, 1210 1207959552: 8421888, 1211 1476395008: 512, 1212 1744830464: 8421378, 1213 2013265920: 2, 1214 2281701376: 8389120, 1215 2550136832: 33280, 1216 2818572288: 8421376, 1217 3087007744: 8389122, 1218 3355443200: 8388610, 1219 3623878656: 32770, 1220 3892314112: 514, 1221 4160749568: 8388608, 1222 1: 32768, 1223 268435457: 2, 1224 536870913: 8421888, 1225 805306369: 8388608, 1226 1073741825: 8421378, 1227 1342177281: 33280, 1228 1610612737: 512, 1229 1879048193: 8389122, 1230 2147483649: 8421890, 1231 2415919105: 8421376, 1232 2684354561: 8388610, 1233 2952790017: 33282, 1234 3221225473: 514, 1235 3489660929: 8389120, 1236 3758096385: 32770, 1237 4026531841: 0, 1238 134217729: 8421890, 1239 402653185: 8421376, 1240 671088641: 8388608, 1241 939524097: 512, 1242 1207959553: 32768, 1243 1476395009: 8388610, 1244 1744830465: 2, 1245 2013265921: 33282, 1246 2281701377: 32770, 1247 2550136833: 8389122, 1248 2818572289: 514, 1249 3087007745: 8421888, 1250 3355443201: 8389120, 1251 3623878657: 0, 1252 3892314113: 33280, 1253 4160749569: 8421378 1254 , 1255 1256 "0": 1074282512, 1257 16777216: 16384, 1258 33554432: 524288, 1259 50331648: 1074266128, 1260 67108864: 1073741840, 1261 83886080: 1074282496, 1262 100663296: 1073758208, 1263 117440512: 16, 1264 134217728: 540672, 1265 150994944: 1073758224, 1266 167772160: 1073741824, 1267 184549376: 540688, 1268 201326592: 524304, 1269 218103808: 0, 1270 234881024: 16400, 1271 251658240: 1074266112, 1272 8388608: 1073758208, 1273 25165824: 540688, 1274 41943040: 16, 1275 58720256: 1073758224, 1276 75497472: 1074282512, 1277 92274688: 1073741824, 1278 109051904: 524288, 1279 125829120: 1074266128, 1280 142606336: 524304, 1281 159383552: 0, 1282 176160768: 16384, 1283 192937984: 1074266112, 1284 209715200: 1073741840, 1285 226492416: 540672, 1286 243269632: 1074282496, 1287 260046848: 16400, 1288 268435456: 0, 1289 285212672: 1074266128, 1290 301989888: 1073758224, 1291 318767104: 1074282496, 1292 335544320: 1074266112, 1293 352321536: 16, 1294 369098752: 540688, 1295 385875968: 16384, 1296 402653184: 16400, 1297 419430400: 524288, 1298 436207616: 524304, 1299 452984832: 1073741840, 1300 469762048: 540672, 1301 486539264: 1073758208, 1302 503316480: 1073741824, 1303 520093696: 1074282512, 1304 276824064: 540688, 1305 293601280: 524288, 1306 310378496: 1074266112, 1307 327155712: 16384, 1308 343932928: 1073758208, 1309 360710144: 1074282512, 1310 377487360: 16, 1311 394264576: 1073741824, 1312 411041792: 1074282496, 1313 427819008: 1073741840, 1314 444596224: 1073758224, 1315 461373440: 524304, 1316 478150656: 0, 1317 494927872: 16400, 1318 511705088: 1074266128, 1319 528482304: 540672 1320 , 1321 1322 "0": 260, 1323 1048576: 0, 1324 2097152: 67109120, 1325 3145728: 65796, 1326 4194304: 65540, 1327 5242880: 67108868, 1328 6291456: 67174660, 1329 7340032: 67174400, 1330 8388608: 67108864, 1331 9437184: 67174656, 1332 10485760: 65792, 1333 11534336: 67174404, 1334 12582912: 67109124, 1335 13631488: 65536, 1336 14680064: 4, 1337 15728640: 256, 1338 524288: 67174656, 1339 1572864: 67174404, 1340 2621440: 0, 1341 3670016: 67109120, 1342 4718592: 67108868, 1343 5767168: 65536, 1344 6815744: 65540, 1345 7864320: 260, 1346 8912896: 4, 1347 9961472: 256, 1348 11010048: 67174400, 1349 12058624: 65796, 1350 13107200: 65792, 1351 14155776: 67109124, 1352 15204352: 67174660, 1353 16252928: 67108864, 1354 16777216: 67174656, 1355 17825792: 65540, 1356 18874368: 65536, 1357 19922944: 67109120, 1358 20971520: 256, 1359 22020096: 67174660, 1360 23068672: 67108868, 1361 24117248: 0, 1362 25165824: 67109124, 1363 26214400: 67108864, 1364 27262976: 4, 1365 28311552: 65792, 1366 29360128: 67174400, 1367 30408704: 260, 1368 31457280: 65796, 1369 32505856: 67174404, 1370 17301504: 67108864, 1371 18350080: 260, 1372 19398656: 67174656, 1373 20447232: 0, 1374 21495808: 65540, 1375 22544384: 67109120, 1376 23592960: 256, 1377 24641536: 67174404, 1378 25690112: 65536, 1379 26738688: 67174660, 1380 27787264: 65796, 1381 28835840: 67108868, 1382 29884416: 67109124, 1383 30932992: 67174400, 1384 31981568: 4, 1385 33030144: 65792 1386 , 1387 1388 "0": 2151682048, 1389 65536: 2147487808, 1390 131072: 4198464, 1391 196608: 2151677952, 1392 262144: 0, 1393 327680: 4198400, 1394 393216: 2147483712, 1395 458752: 4194368, 1396 524288: 2147483648, 1397 589824: 4194304, 1398 655360: 64, 1399 720896: 2147487744, 1400 786432: 2151678016, 1401 851968: 4160, 1402 917504: 4096, 1403 983040: 2151682112, 1404 32768: 2147487808, 1405 98304: 64, 1406 163840: 2151678016, 1407 229376: 2147487744, 1408 294912: 4198400, 1409 360448: 2151682112, 1410 425984: 0, 1411 491520: 2151677952, 1412 557056: 4096, 1413 622592: 2151682048, 1414 688128: 4194304, 1415 753664: 4160, 1416 819200: 2147483648, 1417 884736: 4194368, 1418 950272: 4198464, 1419 1015808: 2147483712, 1420 1048576: 4194368, 1421 1114112: 4198400, 1422 1179648: 2147483712, 1423 1245184: 0, 1424 1310720: 4160, 1425 1376256: 2151678016, 1426 1441792: 2151682048, 1427 1507328: 2147487808, 1428 1572864: 2151682112, 1429 1638400: 2147483648, 1430 1703936: 2151677952, 1431 1769472: 4198464, 1432 1835008: 2147487744, 1433 1900544: 4194304, 1434 1966080: 64, 1435 2031616: 4096, 1436 1081344: 2151677952, 1437 1146880: 2151682112, 1438 1212416: 0, 1439 1277952: 4198400, 1440 1343488: 4194368, 1441 1409024: 2147483648, 1442 1474560: 2147487808, 1443 1540096: 64, 1444 1605632: 2147483712, 1445 1671168: 4096, 1446 1736704: 2147487744, 1447 1802240: 2151678016, 1448 1867776: 4160, 1449 1933312: 2151682048, 1450 1998848: 4194304, 1451 2064384: 4198464 1452 , 1453 1454 "0": 128, 1455 4096: 17039360, 1456 8192: 262144, 1457 12288: 536870912, 1458 16384: 537133184, 1459 20480: 16777344, 1460 24576: 553648256, 1461 28672: 262272, 1462 32768: 16777216, 1463 36864: 537133056, 1464 40960: 536871040, 1465 45056: 553910400, 1466 49152: 553910272, 1467 53248: 0, 1468 57344: 17039488, 1469 61440: 553648128, 1470 2048: 17039488, 1471 6144: 553648256, 1472 10240: 128, 1473 14336: 17039360, 1474 18432: 262144, 1475 22528: 537133184, 1476 26624: 553910272, 1477 30720: 536870912, 1478 34816: 537133056, 1479 38912: 0, 1480 43008: 553910400, 1481 47104: 16777344, 1482 51200: 536871040, 1483 55296: 553648128, 1484 59392: 16777216, 1485 63488: 262272, 1486 65536: 262144, 1487 69632: 128, 1488 73728: 536870912, 1489 77824: 553648256, 1490 81920: 16777344, 1491 86016: 553910272, 1492 90112: 537133184, 1493 94208: 16777216, 1494 98304: 553910400, 1495 102400: 553648128, 1496 106496: 17039360, 1497 110592: 537133056, 1498 114688: 262272, 1499 118784: 536871040, 1500 122880: 0, 1501 126976: 17039488, 1502 67584: 553648256, 1503 71680: 16777216, 1504 75776: 17039360, 1505 79872: 537133184, 1506 83968: 536870912, 1507 88064: 17039488, 1508 92160: 128, 1509 96256: 553910272, 1510 100352: 262272, 1511 104448: 553910400, 1512 108544: 0, 1513 112640: 553648128, 1514 116736: 16777344, 1515 120832: 262144, 1516 124928: 537133056, 1517 129024: 536871040 1518 , 1519 1520 "0": 268435464, 1521 256: 8192, 1522 512: 270532608, 1523 768: 270540808, 1524 1024: 268443648, 1525 1280: 2097152, 1526 1536: 2097160, 1527 1792: 268435456, 1528 2048: 0, 1529 2304: 268443656, 1530 2560: 2105344, 1531 2816: 8, 1532 3072: 270532616, 1533 3328: 2105352, 1534 3584: 8200, 1535 3840: 270540800, 1536 128: 270532608, 1537 384: 270540808, 1538 640: 8, 1539 896: 2097152, 1540 1152: 2105352, 1541 1408: 268435464, 1542 1664: 268443648, 1543 1920: 8200, 1544 2176: 2097160, 1545 2432: 8192, 1546 2688: 268443656, 1547 2944: 270532616, 1548 3200: 0, 1549 3456: 270540800, 1550 3712: 2105344, 1551 3968: 268435456, 1552 4096: 268443648, 1553 4352: 270532616, 1554 4608: 270540808, 1555 4864: 8200, 1556 5120: 2097152, 1557 5376: 268435456, 1558 5632: 268435464, 1559 5888: 2105344, 1560 6144: 2105352, 1561 6400: 0, 1562 6656: 8, 1563 6912: 270532608, 1564 7168: 8192, 1565 7424: 268443656, 1566 7680: 270540800, 1567 7936: 2097160, 1568 4224: 8, 1569 4480: 2105344, 1570 4736: 2097152, 1571 4992: 268435464, 1572 5248: 268443648, 1573 5504: 8200, 1574 5760: 270540808, 1575 6016: 270532608, 1576 6272: 270540800, 1577 6528: 270532616, 1578 6784: 8192, 1579 7040: 2105352, 1580 7296: 2097160, 1581 7552: 0, 1582 7808: 268435456, 1583 8064: 268443656 1584 , 1585 1586 "0": 1048576, 1587 16: 33555457, 1588 32: 1024, 1589 48: 1049601, 1590 64: 34604033, 1591 80: 0, 1592 96: 1, 1593 112: 34603009, 1594 128: 33555456, 1595 144: 1048577, 1596 160: 33554433, 1597 176: 34604032, 1598 192: 34603008, 1599 208: 1025, 1600 224: 1049600, 1601 240: 33554432, 1602 8: 34603009, 1603 24: 0, 1604 40: 33555457, 1605 56: 34604032, 1606 72: 1048576, 1607 88: 33554433, 1608 104: 33554432, 1609 120: 1025, 1610 136: 1049601, 1611 152: 33555456, 1612 168: 34603008, 1613 184: 1048577, 1614 200: 1024, 1615 216: 34604033, 1616 232: 1, 1617 248: 1049600, 1618 256: 33554432, 1619 272: 1048576, 1620 288: 33555457, 1621 304: 34603009, 1622 320: 1048577, 1623 336: 33555456, 1624 352: 34604032, 1625 368: 1049601, 1626 384: 1025, 1627 400: 34604033, 1628 416: 1049600, 1629 432: 1, 1630 448: 0, 1631 464: 34603008, 1632 480: 33554433, 1633 496: 1024, 1634 264: 1049600, 1635 280: 33555457, 1636 296: 34603009, 1637 312: 1, 1638 328: 33554432, 1639 344: 1048576, 1640 360: 1025, 1641 376: 34604032, 1642 392: 33554433, 1643 408: 34603008, 1644 424: 0, 1645 440: 34604033, 1646 456: 1049601, 1647 472: 1024, 1648 488: 33555456, 1649 504: 1048577 1650 , 1651 1652 "0": 134219808, 1653 1: 131072, 1654 2: 134217728, 1655 3: 32, 1656 4: 131104, 1657 5: 134350880, 1658 6: 134350848, 1659 7: 2048, 1660 8: 134348800, 1661 9: 134219776, 1662 10: 133120, 1663 11: 134348832, 1664 12: 2080, 1665 13: 0, 1666 14: 134217760, 1667 15: 133152, 1668 2147483648: 2048, 1669 2147483649: 134350880, 1670 2147483650: 134219808, 1671 2147483651: 134217728, 1672 2147483652: 134348800, 1673 2147483653: 133120, 1674 2147483654: 133152, 1675 2147483655: 32, 1676 2147483656: 134217760, 1677 2147483657: 2080, 1678 2147483658: 131104, 1679 2147483659: 134350848, 1680 2147483660: 0, 1681 2147483661: 134348832, 1682 2147483662: 134219776, 1683 2147483663: 131072, 1684 16: 133152, 1685 17: 134350848, 1686 18: 32, 1687 19: 2048, 1688 20: 134219776, 1689 21: 134217760, 1690 22: 134348832, 1691 23: 131072, 1692 24: 0, 1693 25: 131104, 1694 26: 134348800, 1695 27: 134219808, 1696 28: 134350880, 1697 29: 133120, 1698 30: 2080, 1699 31: 134217728, 1700 2147483664: 131072, 1701 2147483665: 2048, 1702 2147483666: 134348832, 1703 2147483667: 133152, 1704 2147483668: 32, 1705 2147483669: 134348800, 1706 2147483670: 134217728, 1707 2147483671: 134219808, 1708 2147483672: 134350880, 1709 2147483673: 134217760, 1710 2147483674: 134219776, 1711 2147483675: 0, 1712 2147483676: 133120, 1713 2147483677: 2080, 1714 2147483678: 131104, 1715 2147483679: 134350848 1716 ], 1717 t = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], 1718 m = g.DES = e.extend( 1719 _7: function () 1720 for (var b = this._13.words, c = [], a = 0; 56 > a; a++) 1721 var f = q[a] - 1; 1722 c[a] = b[f >>> 5] >>> 31 - f % 32 & 1 1723 1724 b = this._25 = []; 1725 for (f = 0; 16 > f; f++) 1726 for (var d = b[f] = [], e = r[f], a = 0; 24 > a; a++) d[a / 6 | 0] |= c[(p[a] - 1 + e) % 28] << 31 - a % 6, 1727 d[4 + (a / 6 | 0)] |= c[28 + (p[a + 24] - 1 + e) % 28] << 31 - a % 6; 1728 d[0] = d[0] << 1 | d[0] >>> 31; 1729 for (a = 1; 7 > a; a++) d[a] >>>= 4 * (a - 1) + 3; 1730 d[7] = d[7] << 5 | d[7] >>> 27 1731 1732 c = this._28 = []; 1733 for (a = 0; 16 > a; a++) c[a] = b[15 - a] 1734 , 1735 encryptBlock: function (b, c) 1736 this._6(b, c, this._25) 1737 , 1738 decryptBlock: function (b, c) 1739 this._6(b, c, this._28) 1740 , 1741 _6: function (b, c, a) 1742 this._0 = b[c]; 1743 this._1 = b[c + 1]; 1744 j.call(this, 4, 252645135); 1745 j.call(this, 16, 65535); 1746 l.call(this, 2, 858993459); 1747 l.call(this, 8, 16711935); 1748 j.call(this, 1, 1431655765); 1749 for (var f = 0; 16 > f; f++) 1750 for (var d = a[f], e = this._0, h = this._1, g = 0, k = 0; 8 > k; k++) g |= s[k][((h ^ d[k]) & t[k]) >>> 0]; 1751 this._0 = h; 1752 this._1 = e ^ g 1753 1754 a = this._0; 1755 this._0 = this._1; 1756 this._1 = a; 1757 j.call(this, 1, 1431655765); 1758 l.call(this, 8, 16711935); 1759 l.call(this, 2, 858993459); 1760 j.call(this, 16, 65535); 1761 j.call(this, 4, 252645135); 1762 b[c] = this._0; 1763 b[c + 1] = this._1 1764 , 1765 keySize: 2, 1766 ivSize: 2, 1767 blockSize: 2 1768 ); 1769 h.DES = e._5(m); 1770 g = g.TripleDES = e.extend( 1771 _7: function () 1772 var b = this._13.words; 1773 this._24 = m.createEncryptor(n.create(b.slice(0, 2))); 1774 this._21 = m.createEncryptor(n.create(b.slice(2, 4))); 1775 this._22 = m.createEncryptor(n.create(b.slice(4, 6))) 1776 , 1777 encryptBlock: function (b, c) 1778 this._24.encryptBlock(b, c); 1779 this._21.decryptBlock(b, c); 1780 this._22.encryptBlock(b, c) 1781 , 1782 decryptBlock: function (b, c) 1783 this._22.decryptBlock(b, c); 1784 this._21.encryptBlock(b, c); 1785 this._24.decryptBlock(b, c) 1786 , 1787 keySize: 6, 1788 ivSize: 2, 1789 blockSize: 2 1790 ); 1791 h.TripleDES = e._5(g) 1792 )(); 1793 const aes_server_key = "tGFsbXNwewZlcg=="; 1794 const aes_server_iv = "w9VydmVswewexbQ=="; 1795 const aes_client_key = "WksdsdflFweFZ=="; 1796 const aes_client_iv = "klsfw9nsp="; 1797 const des_key = "ssfefwksdjskdsj=="; 1798 const des_iv = "skzlkpoi="; 1799 const aes_local_key = ‘emhlbnFpcGFsbWtleQ==‘; 1800 const aes_local_iv = ‘emhlbnFpcGFsbWl2‘; 1801 var BASE64 = 1802 encrypt: function (text) 1803 var b = new Base64(); 1804 return b.encode(text) 1805 , 1806 decrypt: function (text) 1807 var b = new Base64(); 1808 return b.decode(text) 1809 1810 ; 1811 var DES = 1812 encrypt: function (text, key, iv) 1813 var secretkey = (CryptoJS.MD5(key).toString()).substr(0, 16); 1814 var secretiv = (CryptoJS.MD5(iv).toString()).substr(24, 8); 1815 secretkey = CryptoJS.enc.Utf8.parse(secretkey); 1816 secretiv = CryptoJS.enc.Utf8.parse(secretiv); 1817 var result = CryptoJS.DES.encrypt(text, secretkey, 1818 iv: secretiv, 1819 mode: CryptoJS.mode.CBC, 1820 padding: CryptoJS.pad.Pkcs7 1821 ); 1822 return result.toString() 1823 , 1824 decrypt: function (text, key, iv) 1825 var secretkey = (CryptoJS.MD5(key).toString()).substr(0, 16); 1826 var secretiv = (CryptoJS.MD5(iv).toString()).substr(24, 8); 1827 secretkey = CryptoJS.enc.Utf8.parse(secretkey); 1828 secretiv = CryptoJS.enc.Utf8.parse(secretiv); 1829 var result = CryptoJS.DES.decrypt(text, secretkey, 1830 iv: secretiv, 1831 mode: CryptoJS.mode.CBC, 1832 padding: CryptoJS.pad.Pkcs7 1833 ); 1834 return result.toString(CryptoJS.enc.Utf8) 1835 1836 ; 1837 var AES = 1838 encrypt: function (text, key, iv) 1839 var secretkey = (CryptoJS.MD5(key).toString()).substr(16, 16); 1840 var secretiv = (CryptoJS.MD5(iv).toString()).substr(0, 16); 1841 secretkey = CryptoJS.enc.Utf8.parse(secretkey); 1842 secretiv = CryptoJS.enc.Utf8.parse(secretiv); 1843 var result = CryptoJS.AES.encrypt(text, secretkey, 1844 iv: secretiv, 1845 mode: CryptoJS.mode.CBC, 1846 padding: CryptoJS.pad.Pkcs7 1847 ); 1848 return result.toString() 1849 , 1850 decrypt: function (text, key, iv) 1851 var secretkey = (CryptoJS.MD5(key).toString()).substr(16, 16); 1852 var secretiv = (CryptoJS.MD5(iv).toString()).substr(0, 16); 1853 secretkey = CryptoJS.enc.Utf8.parse(secretkey); 1854 secretiv = CryptoJS.enc.Utf8.parse(secretiv); 1855 var result = CryptoJS.AES.decrypt(text, secretkey, 1856 iv: secretiv, 1857 mode: CryptoJS.mode.CBC, 1858 padding: CryptoJS.pad.Pkcs7 1859 ); 1860 return result.toString(CryptoJS.enc.Utf8) 1861 1862 ; 1863 var localStorageUtil = 1864 save: function (name, value) 1865 var text = JSON.stringify(value); 1866 text = BASE64.encrypt(text); 1867 text = AES.encrypt(text, aes_local_key, aes_local_iv); 1868 try 1869 localStorage.setItem(name, text) 1870 catch (oException) 1871 if (oException.name === ‘QuotaExceededError‘) 1872 console.log(‘超出本地存储限额!‘); 1873 localStorage.clear(); 1874 localStorage.setItem(name, text) 1875 1876 1877 , 1878 check: function (name) 1879 return localStorage.getItem(name) 1880 , 1881 getValue: function (name) 1882 var text = localStorage.getItem(name); 1883 var result = null; 1884 if (text) 1885 text = AES.decrypt(text, aes_local_key, aes_local_iv); 1886 text = BASE64.decrypt(text); 1887 result = JSON.parse(text) 1888 1889 return result 1890 , 1891 remove: function (name) 1892 localStorage.removeItem(name) 1893 1894 ; 1895 1896 function getDataFromLocalStorage(key, period) 1897 if (typeof period === ‘undefined‘) 1898 period = 0 1899 1900 var d = DES.encrypt(key); 1901 d = BASE64.encrypt(key); 1902 var data = localStorageUtil.getValue(key); 1903 if (data) 1904 const time = data.time; 1905 const current = new Date().getTime(); 1906 if (new Date().getHours() >= 0 && new Date().getHours() < 5 && period > 1) 1907 period = 1 1908 1909 if (current - (period * 60 * 60 * 1000) > time) 1910 data = null 1911 1912 if (new Date().getHours() >= 5 && new Date(time).getDate() !== new Date().getDate() && period === 24) 1913 data = null 1914 1915 1916 return data 1917 1918 1919 function ObjectSort(obj) 1920 var newObject = ; 1921 Object.keys(obj).sort().map(function (key) 1922 newObject[key] = obj[key] 1923 ); 1924 return newObject 1925 1926 1927 function decodeData(data) 1928 data = AES.decrypt(data, aes_server_key, aes_server_iv); 1929 data = DES.decrypt(data, des_key, des_iv); 1930 data = BASE64.decrypt(data); 1931 return data 1932 1933 1934 var getParam = (function () 1935 function ObjectSort(obj) 1936 var newObject = ; 1937 Object.keys(obj).sort().map(function (key) 1938 newObject[key] = obj[key] 1939 ); 1940 return newObject 1941 1942 1943 return function (method, obj) 1944 var appId = ‘1a45f75b824b2dc628d5955356b5ef18‘; 1945 var clienttype = ‘WEB‘; 1946 var timestamp = new Date().getTime(); 1947 var param = 1948 appId: appId, 1949 method: method, 1950 timestamp: timestamp, 1951 clienttype: clienttype, 1952 object: obj, 1953 secret: hex_md5(appId + method + timestamp + clienttype + JSON.stringify(ObjectSort(obj))) 1954 ; 1955 param = BASE64.encrypt(JSON.stringify(param)); 1956 return AES.encrypt(param, aes_client_key, aes_client_iv) 1957 1958 )(); 1959 1960 function getServerData(method, object, callback, period) 1961 const key = hex_md5(method + JSON.stringify(object)); 1962 const data = getDataFromLocalStorage(key, period); 1963 if (!data) 1964 var param = getParam(method, object); 1965 $.ajax( 1966 url: ‘../apinew/aqistudyapi.php‘, 1967 data: 1968 d: param 1969 , 1970 type: "post", 1971 success: function (data) 1972 data = decodeData(data);//响应数据解密函数 1973 obj = JSON.parse(data); 1974 if (obj.success) 1975 if (period > 0) 1976 obj.result.time = new Date().getTime(); 1977 localStorageUtil.save(key, obj.result) 1978 1979 callback(obj.result) 1980 else 1981 console.log(obj.errcode, obj.errmsg) 1982 1983 1984 ) 1985 else 1986 callback(data) 1987 1988 1989 1990 //参数加密函数 1991 function getPostCode(method, city, type, startTime, endTime) 1992 var param = ; 1993 param.city = city; 1994 param.type = type; 1995 param.startTime = startTime; 1996 param.endTime = endTime; 1997 return getParam(method, param); 1998
2.爬虫脚本----执行js代码
1 import requests 2 import execjs#导入python执行js代码的模块 3 node=execjs.get() 4 file=‘jsCode.js‘ 5 ctx=node.compile(open(file,‘r‘,encoding=‘utf-8‘).read()) 6 7 8 #getData()函数发送了两个ajax请求,获取了两组不同数据,因此也需要两次不同参数请求 9 method1 = ‘GETDETAIL‘ 10 method2 = ‘GETCITYWEATHER‘ 11 Type=‘HOUR‘ 12 #以下参数按实际需求更改 13 city=‘北京‘ 14 startTime=‘2019-08-10 19:00‘ 15 endTime=‘2019-08-11 22:00‘ 16 17 #加密参数1 18 js1=f‘getPostCode("method1","city","Type","startTime","endTime")‘ 19 params1=ctx.eval(js1) 20 # print(params1) 21 22 23 #加密参数2 24 js2=f‘getPostCode("method2","city","Type","startTime","endTime")‘ 25 params2=ctx.eval(js2) 26 # print(params2) 27 28 29 headers="User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" 30 url=‘https://www.aqistudy.cn/apinew/aqistudyapi.php‘ 31 #同时发起的连个ajax请求参数不一样 32 data1= 33 "d":params1 34 35 36 data2= 37 "d":params2 38 39 40 41 #获取响应,解密数据1 42 reponse1=requests.post(url,data=data1,headers=headers).text 43 reponse_json1=ctx.eval(f‘decodeData("reponse1")‘) 44 print(reponse_json1) 45 46 #获取响应,解密数据2 47 reponse2=requests.post(url,data=data2,headers=headers).text 48 reponse_json2=ctx.eval(f‘decodeData("reponse2")‘) 49 print(reponse_json2)
以上是关于中国空气质量在线监测分析平台之JS加密JS混淆处理的主要内容,如果未能解决你的问题,请参考以下文章