Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. // ==UserScript==
  2. // @name live autoreg
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match http://www.msn.com/*
  8. // @include https://*.live.com/*
  9. // @require http://code.jquery.com/jquery-latest.js
  10. // @grant GM_xmlhttpRequest
  11. // ==/UserScript==
  12. var page = location.pathname;
  13. var host = location.hostname;
  14. (function ($, undefined) {
  15. $(function () {
  16. var hCondition = (!host.includes('live.com')) ? msnClick() : signUp();
  17. function signUp() {
  18. if (page.includes('login.srf')) {
  19. $('a').each(function() {
  20. if (this.getAttribute('id') == 'signup') this.click();
  21. });
  22. }
  23. if (document.body.innerHTML.includes('Create an account')) {
  24. GM_xmlhttpRequest({
  25. method: "GET",
  26. url: "http://ask.fm/",
  27. onload: function(response) {
  28. var doc = new DOMParser().parseFromString(response.responseText, 'text/html');
  29. var imgs = doc.getElementsByTagName('img');
  30. for (var i = 0; i < imgs.length; i++) {
  31. var tImg = imgs[i];
  32. if (tImg.src.includes('/thumb/')) {
  33. var uname = tImg.getAttribute('alt') + jrand(1, 9999);
  34. var name = tImg.getAttribute('alt');
  35. var lname = tImg.getAttribute('alt');
  36. var pass = Math.random().toString(36).substring(jrand(16, 20));
  37. var inter = setInterval(function() {
  38. if (typeof $('#pageDialogForm_0') != 'undefined') {
  39. fillForms(uname, name, lname, pass);
  40. clearInterval(inter);
  41. }
  42. }, 100);
  43. break;
  44. }
  45. }
  46. }
  47. });
  48. }
  49. }
  50. function fillForms(uname, name, lname, pass) {
  51. document.getElementsByTagName('a')[3].click();
  52. $('input').each(function() {
  53. var tId = this.getAttribute('id');
  54. switch (tId) {
  55. case 'FirstName':
  56. this.value = uname;
  57. this.setAttribute('class', 'form-control');
  58. break;
  59. case 'LastName':
  60. break;
  61. case 'MemberName':
  62. break;
  63. case 'Password':
  64. break;
  65. case 'RetypePassword':
  66. break;
  67. case 'iAltEmail':
  68. break;
  69. }
  70. document.getElementsByTagName('input')[14].focus();
  71. });
  72. $('select').each(function() {
  73. var id = this.getAttribute('id');
  74. switch(id) {
  75. case 'BirthMonth':
  76. break;
  77. case 'BirthDay':
  78. break;
  79. case 'BirthYear':
  80. break;
  81. case 'Gender':
  82. break;
  83. }
  84. });
  85. }
  86. function msnClick() {
  87. if (page == '/') {
  88. $('span').each(function() {
  89. if (this.getAttribute('class') == 'mectrlname mectrlsignin') this.click();
  90. });
  91. }
  92. }
  93. function jrand(min, max) {
  94. return Math.floor(Math.random() * (max - min + 1)) + min;
  95. }
  96. });
  97. })(window.jQuery.noConflict(true));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement