Advertisement
Guest User

Untitled

a guest
Nov 28th, 2016
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. < script language = "JavaScript" > <!--
  2. function doLoad() {
  3.     document.Login_Form.Login_Name.disabled = false;
  4.     document.Login_Form.Login_Pwd.disabled = false;
  5.     document.Login_Form.texttpLoginBtn.disabled = false;
  6.     if (window != top) top.location.href = location.href;
  7.     document.Login_Form.Login_Name.focus();
  8. }
  9. var key_flag = 0;
  10. var hex_chr = "0123456789abcdef";
  11. function rhex(num) {
  12.     var str = "";
  13.     for (var j = 0; j <= 3; j++) {
  14.         var num1 = rightmove(num, (j * 8 + 4));
  15.         var num2 = and(num1, 0x0f);
  16.         var num3 = rightmove(num, j * 8);
  17.         var num4 = and(num3, 0x0f);
  18.         str += hex_chr.charAt(num2) + hex_chr.charAt(num4);
  19.     }
  20.     return str;
  21. }
  22. function and(i, j) {
  23.     var temi;
  24.     var temj;
  25.     var result;
  26.     if (i >= 0 && i < 0X80000000) if (j >= 0 && j < 0X80000000) return i & j;
  27.     if (i < 0 || i >= 0X80000000) {
  28.         if (j < 0 || j >= 0X80000000) {
  29.             if (i < 0) temi = i + 0x80000000;
  30.             else temi = i - 0X80000000;
  31.             if (j < 0) temj = j + 0x80000000;
  32.             else temj = j - 0X80000000;
  33.             result = temi & temj;
  34.             result = result - 0X80000000;
  35.             return result;
  36.         }
  37.     }
  38.     if (i < 0 || i >= 0X80000000) {
  39.         if (i < 0) temi = i + 0x80000000;
  40.         else temi = i - 0X80000000;
  41.         result = temi & j;
  42.         return result;
  43.     }
  44.     if (j < 0 || j >= 0X80000000) {
  45.         if (j < 0) temj = j + 0x80000000;
  46.         else temj = j - 0X80000000;
  47.         result = i & temj;
  48.         return result;
  49.     }
  50. }
  51. function reverse(num1) {
  52.     var f = 0;
  53.     if (num1 >= 0X80000000) {
  54.         num1 = num1 - 0X80000000;
  55.         f = (~num1);
  56.         f = f + 0X80000000;
  57.         return f;
  58.     }
  59.     if (num1 < 0) {
  60.         num1 = num1 + 0X80000000;
  61.         f = (~num1);
  62.         f = f + 0X80000000;
  63.         return f;
  64.     }
  65.     f = (~num1);
  66.     return f;
  67. }
  68. function or(i, j) {
  69.     var temi;
  70.     var temj;
  71.     var result;
  72.     if (i >= 0 && i < 0X80000000) if (j >= 0 && j < 0X80000000) return i | j;
  73.     if (i < 0 || i >= 0X80000000) {
  74.         if (j < 0 || j >= 0X80000000) {
  75.             if (i < 0) temi = i + 0x80000000;
  76.             else temi = i - 0X80000000;
  77.             if (j < 0) temj = j + 0x80000000;
  78.             else temj = j - 0X80000000;
  79.             result = temi | temj;
  80.             result = result - 0X80000000;
  81.             return result;
  82.         }
  83.     }
  84.     if (i < 0 || i >= 0X80000000) {
  85.         if (i < 0) temi = i + 0x80000000;
  86.         else temi = i - 0X80000000;
  87.         result = temi | j;
  88.         result = result - 0X80000000;
  89.         return result;
  90.     }
  91.     if (j < 0 || j >= 0X80000000) {
  92.         if (j < 0) temj = j + 0x80000000;
  93.         else temj = j - 0X80000000;
  94.         result = i | temj;
  95.         result = result - 0X80000000;
  96.         return result;
  97.     }
  98. }
  99. function xor(i, j) {
  100.     var temi;
  101.     var temj;
  102.     var result;
  103.     if (i >= 0 && i < 0X80000000) if (j >= 0 && j < 0X80000000) return i ^ j;
  104.     if (i < 0 || i >= 0X80000000) {
  105.         if (j < 0 || j >= 0X80000000) {
  106.             if (i < 0) temi = i + 0x80000000;
  107.             else temi = i - 0X80000000;
  108.             if (j < 0) temj = j + 0x80000000;
  109.             else temj = j - 0X80000000;
  110.             result = temi ^ temj;
  111.             return result;
  112.         }
  113.     }
  114.     if (i < 0 || i >= 0X80000000) {
  115.         if (i < 0) temi = i + 0x80000000;
  116.         else temi = i - 0X80000000;
  117.         result = temi ^ j;
  118.         result = result + 0X80000000;
  119.         return result;
  120.     }
  121.     if (j < 0 || j >= 0X80000000) {
  122.         if (j < 0) temj = j + 0x80000000;
  123.         else temj = j - 0X80000000;
  124.         result = i ^ temj;
  125.         result = result + 0X80000000;
  126.         return result;
  127.     }
  128. }
  129. function rightmove(num, i) {
  130.     var result;
  131.     var temp = 0x80000000;
  132.     if (num >= 0 && num < 0X80000000) {
  133.         result = num >> i;
  134.         return result;
  135.     }
  136.     if (num < 0 || num >= 0X80000000) {
  137.         if (num < 0) num = num + 0x80000000;
  138.         else num = num - 0X80000000;
  139.         result = num >> i;
  140.         for (; i > 0; i = i - 1) temp = temp / 2;
  141.         result = temp + result;
  142.         return result;
  143.     }
  144. }
  145. function leftmove(num, i) {
  146.     var result;
  147.     if (num >= 0 && num < 0X80000000) {
  148.         result = num << i;
  149.         return result;
  150.     }
  151.     if (num < 0 || num >= 0X80000000) {
  152.         if (num < 0) num = num + 0x80000000;
  153.         else num = num - 0X80000000 result = num << i;
  154.         return result;
  155.     }
  156. }
  157. function str2blks_MD5(str) {
  158.     var nblk = ((str.length + 8) >> 6) + 1;
  159.     var blks = new Array(nblk * 16);
  160.     for (var i = 0; i < nblk * 16; i++) blks[i] = 0;
  161.     for (i = 0; i < str.length; i++) blks[i >> 2] |= str.charCodeAt(i) << ((i % 4) * 8);
  162.     blks[i >> 2] |= 0x80 << ((i % 4) * 8);
  163.     blks[nblk * 16 - 2] = str.length * 8;
  164.     return blks;
  165. }
  166. function add(x, y) {
  167.     var num1 = and(x, 0x7FFFFFFF);
  168.     var num2 = and(y, 0x7FFFFFFF);
  169.     var num3 = and(x, 0x80000000);
  170.     var num4 = and(y, 0x80000000);
  171.     var num5 = num1 + num2;
  172.     var num6 = xor(num5, num3);
  173.     var num = xor(num6, num4);
  174.     return num;
  175. }
  176. function rol(num, cnt) {
  177.     var num1 = leftmove(num, cnt);
  178.     var num2 = rightmove(num, (32 - cnt));
  179.     var num3 = or(num1, num2);
  180.     return num3;
  181. }
  182. function cmn(q, a, b, x, s, t) {
  183.     return add(rol(add(add(a, q), add(x, t)), s), b);
  184. }
  185. function ff(a, b, c, d, x, s, t) {
  186.     var num1 = and(b, c);
  187.     var num2 = and(reverse(b), d);
  188.     var num3 = or(num1, num2);
  189.     return cmn(num3, a, b, x, s, t);
  190. }
  191. function gg(a, b, c, d, x, s, t) {
  192.     var num1 = and(b, d);
  193.     var num2 = and(c, reverse(d));
  194.     var num3 = or(num1, num2);
  195.     return cmn(num3, a, b, x, s, t);
  196. }
  197. function hh(a, b, c, d, x, s, t) {
  198.     var num1 = xor(b, c);
  199.     var num2 = xor(num1, d);
  200.     return cmn(num2, a, b, x, s, t);
  201. }
  202. function ii(a, b, c, d, x, s, t) {
  203.     var num1 = or(b, reverse(d));
  204.     var num2 = xor(c, num1);
  205.     return cmn(num2, a, b, x, s, t);
  206. }
  207. function calcMD5(str) {
  208.     var x = str2blks_MD5(str);
  209.     var a = 0x67452301;
  210.     var b = 0xEFCDAB89;
  211.     var c = 0x98BADCFE;
  212.     var d = 0x10325476;
  213.     for (var i = 0; i < x.length; i += 16) {
  214.         var olda = a;
  215.         var oldb = b;
  216.         var oldc = c;
  217.         var oldd = d;
  218.         a = ff(a, b, c, d, x[i + 0], 7, 0xD76AA478);
  219.         d = ff(d, a, b, c, x[i + 1], 12, 0xE8C7B756);
  220.         c = ff(c, d, a, b, x[i + 2], 17, 0x242070DB);
  221.         b = ff(b, c, d, a, x[i + 3], 22, 0xC1BDCEEE);
  222.         a = ff(a, b, c, d, x[i + 4], 7, 0xF57C0FAF);
  223.         d = ff(d, a, b, c, x[i + 5], 12, 0x4787C62A);
  224.         c = ff(c, d, a, b, x[i + 6], 17, 0xA8304613);
  225.         b = ff(b, c, d, a, x[i + 7], 22, 0xFD469501);
  226.         a = ff(a, b, c, d, x[i + 8], 7, 0x698098D8);
  227.         d = ff(d, a, b, c, x[i + 9], 12, 0x8B44F7AF);
  228.         c = ff(c, d, a, b, x[i + 10], 17, 0xFFFF5BB1);
  229.         b = ff(b, c, d, a, x[i + 11], 22, 0x895CD7BE);
  230.         a = ff(a, b, c, d, x[i + 12], 7, 0x6B901122);
  231.         d = ff(d, a, b, c, x[i + 13], 12, 0xFD987193);
  232.         c = ff(c, d, a, b, x[i + 14], 17, 0xA679438E);
  233.         b = ff(b, c, d, a, x[i + 15], 22, 0x49B40821);
  234.         a = gg(a, b, c, d, x[i + 1], 5, 0xF61E2562);
  235.         d = gg(d, a, b, c, x[i + 6], 9, 0xC040B340);
  236.         c = gg(c, d, a, b, x[i + 11], 14, 0x265E5A51);
  237.         b = gg(b, c, d, a, x[i + 0], 20, 0xE9B6C7AA);
  238.         a = gg(a, b, c, d, x[i + 5], 5, 0xD62F105D);
  239.         d = gg(d, a, b, c, x[i + 10], 9, 0x02441453);
  240.         c = gg(c, d, a, b, x[i + 15], 14, 0xD8A1E681);
  241.         b = gg(b, c, d, a, x[i + 4], 20, 0xE7D3FBC8);
  242.         a = gg(a, b, c, d, x[i + 9], 5, 0x21E1CDE6);
  243.         d = gg(d, a, b, c, x[i + 14], 9, 0xC33707D6);
  244.         c = gg(c, d, a, b, x[i + 3], 14, 0xF4D50D87);
  245.         b = gg(b, c, d, a, x[i + 8], 20, 0x455A14ED);
  246.         a = gg(a, b, c, d, x[i + 13], 5, 0xA9E3E905);
  247.         d = gg(d, a, b, c, x[i + 2], 9, 0xFCEFA3F8);
  248.         c = gg(c, d, a, b, x[i + 7], 14, 0x676F02D9);
  249.         b = gg(b, c, d, a, x[i + 12], 20, 0x8D2A4C8A);
  250.         a = hh(a, b, c, d, x[i + 5], 4, 0xFFFA3942);
  251.         d = hh(d, a, b, c, x[i + 8], 11, 0x8771F681);
  252.         c = hh(c, d, a, b, x[i + 11], 16, 0x6D9D6122);
  253.         b = hh(b, c, d, a, x[i + 14], 23, 0xFDE5380C);
  254.         a = hh(a, b, c, d, x[i + 1], 4, 0xA4BEEA44);
  255.         d = hh(d, a, b, c, x[i + 4], 11, 0x4BDECFA9);
  256.         c = hh(c, d, a, b, x[i + 7], 16, 0xF6BB4B60);
  257.         b = hh(b, c, d, a, x[i + 10], 23, 0xBEBFBC70);
  258.         a = hh(a, b, c, d, x[i + 13], 4, 0x289B7EC6);
  259.         d = hh(d, a, b, c, x[i + 0], 11, 0xEAA127FA);
  260.         c = hh(c, d, a, b, x[i + 3], 16, 0xD4EF3085);
  261.         b = hh(b, c, d, a, x[i + 6], 23, 0x04881D05);
  262.         a = hh(a, b, c, d, x[i + 9], 4, 0xD9D4D039);
  263.         d = hh(d, a, b, c, x[i + 12], 11, 0xE6DB99E5);
  264.         c = hh(c, d, a, b, x[i + 15], 16, 0x1FA27CF8);
  265.         b = hh(b, c, d, a, x[i + 2], 23, 0xC4AC5665);
  266.         a = ii(a, b, c, d, x[i + 0], 6, 0xF4292244);
  267.         d = ii(d, a, b, c, x[i + 7], 10, 0x432AFF97);
  268.         c = ii(c, d, a, b, x[i + 14], 15, 0xAB9423A7);
  269.         b = ii(b, c, d, a, x[i + 5], 21, 0xFC93A039);
  270.         a = ii(a, b, c, d, x[i + 12], 6, 0x655B59C3);
  271.         d = ii(d, a, b, c, x[i + 3], 10, 0x8F0CCC92);
  272.         c = ii(c, d, a, b, x[i + 10], 15, 0xFFEFF47D);
  273.         b = ii(b, c, d, a, x[i + 1], 21, 0x85845DD1);
  274.         a = ii(a, b, c, d, x[i + 8], 6, 0x6FA87E4F);
  275.         d = ii(d, a, b, c, x[i + 15], 10, 0xFE2CE6E0);
  276.         c = ii(c, d, a, b, x[i + 6], 15, 0xA3014314);
  277.         b = ii(b, c, d, a, x[i + 13], 21, 0x4E0811A1);
  278.         a = ii(a, b, c, d, x[i + 4], 6, 0xF7537E82);
  279.         d = ii(d, a, b, c, x[i + 11], 10, 0xBD3AF235);
  280.         c = ii(c, d, a, b, x[i + 2], 15, 0x2AD7D2BB);
  281.         b = ii(b, c, d, a, x[i + 9], 21, 0xEB86D391);
  282.         a = add(a, olda);
  283.         b = add(b, oldb);
  284.         c = add(c, oldc);
  285.         d = add(d, oldd);
  286.     }
  287.     return rhex(a) + rhex(b) + rhex(c) + rhex(d);
  288. }
  289. function passwordMD5(str) {
  290.     var MDstring = calcMD5(str);
  291.     return MDstring;
  292. }
  293. function LoginClick(loginUsername, loginPassword, hiddenUsername, hiddenPassword) {
  294.     var usernameStr;
  295.     var passwordStr;
  296.     if (null == loginUsername || 0 == loginUsername.value.length) {
  297.         alert("Please input a username");
  298.         key_flag = 0;
  299.         return false;
  300.     }
  301.     if (null == loginPassword || 0 == loginPassword.value.length) {
  302.         alert("Please input a password");
  303.         key_flag = 0;
  304.         return false;
  305.     }
  306.     usernameStr = passwordMD5(loginUsername.value);
  307.     passwordStr = passwordMD5(loginPassword.value);
  308.     hiddenUsername.value = usernameStr;
  309.     hiddenPassword.value = passwordStr;
  310.     loginPassword.value = "Ha2S+eOKqmzA6nrlmTeh7w==";
  311.     return true;
  312. }
  313. function checkForm() {
  314.     if (key_flag == 0) {
  315.         key_flag = 1;
  316.         var loginUsername;
  317.         var loginPassword;
  318.         var hiddenUsername;
  319.         var hiddenPassword;
  320.         loginUsername = document.Login_Form.Login_Name;
  321.         loginPassword = document.Login_Form.Login_Pwd;
  322.         hiddenUsername = document.Login_Form.uiWebLoginhiddenUsername;
  323.         hiddenPassword = document.Login_Form.uiWebLoginhiddenPassword;
  324.         if (LoginClick(loginUsername, loginPassword, hiddenUsername, hiddenPassword)) {
  325.             document.Login_Form.submit();
  326.             return true;
  327.         } else return false;
  328.     }
  329. }
  330. function changeBorderColor(obj, val) {
  331.     if (val == 1) obj.style.borderColor = "#FF9933";
  332.     else obj.style.borderColor = "#E5E5E5";
  333. }
  334. function onHandleKeyPress(e) {
  335.     var key = 0;
  336.     if (window.event) key = window.event.keyCode;
  337.     else if (e) key = e.which;
  338.     if (key == 13) {
  339.         if (document.activeElement == null || (document.activeElement.id != 'LoginBtnID')) return checkForm();
  340.     }
  341. }
  342. document.onkeypress = onHandleKeyPress;
  343. //-->
  344. var timelast = 0;
  345. function IncreaseSec() {
  346.     if (timelast <= 2) window.setTimeout("window.location.reload(true);", 1000);
  347.     timelast = timelast - 1;
  348.     var infoStr2 = 'You have exceeded five attempts, please try again in';
  349.     infoStr2 = infoStr2 + ' ' + timelast + "s.";
  350.     document.getElementById("tr1").innerHTML = infoStr2;
  351. } < /script>/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement