Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.querySelector("#start-control").addEventListener("click", function() {
- var button = document.querySelector("#start-control");
- if (button.innerHTML == "START") {
- button.innerHTML = "STOP";
- startGen();
- } else {
- button.innerHTML = "START";
- stopGen();
- }
- });
- function startGen() {
- if (document.querySelector("#use-words-in-username").checked) {
- leagueUsername = wordGen("username");
- } else {
- leagueUsername = randomGen("username", "", "");
- }
- if (document.querySelector("#username-as-password").checked) {
- leaguePassword = leagueUsername;
- } else if (document.querySelector("#use-words-in-password").checked) {
- leaguePassword = wordGen("username");
- } else {
- leaguePassword = randomGen("password", "", "");
- }
- createAccount();
- }
- function stopGen() {
- var location = document.querySelector("#webview");
- clearTimeout(checkViewer);
- location.innerHTML = "";
- }
- function randomGen(type, charlist, text) {
- var leg = document.querySelector("#" + type + "-length").innerHTML;
- var charArray = ["abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "1234567890"]
- var typeArray = ["lowercase", "capitals", "numbers"];
- for (var num = 0; num < 3; num++) {
- if (document.querySelector("#" + type + "-" + typeArray[num]).checked) {
- charlist += charArray[num];
- };
- };
- for (var i = 0; i < leg; i++) {
- text += charlist.charAt(Math.floor(Math.random() * charlist.length));
- }
- var res = text.substring(0, (text.length - 1)) + Math.floor(Math.random() * 10);
- return res;
- }
- function wordGen(type) {
- var user = wordlist[Math.floor(Math.random() * wordlist.length)] + wordlist[Math.floor(Math.random() * wordlist.length)];
- var leg = document.querySelector("#" + type + "-length").innerHTML;
- if (user.length <= leg) {
- dif = leg - user.length;
- for (dif >= leg; dif--;) {
- user += Math.floor(Math.random() * 10);
- };
- return user;
- } else {
- var res = user.substring(0, leg - 1);
- res += Math.floor((Math.random() * 10));
- return res;
- }
- }
- function createAccount() {
- if (document.querySelector("#amount-remaining").innerHTML > 0) {
- var location = document.querySelector("#webview");
- location.innerHTML = "";
- var webview = document.createElement("webview");
- webview.setAttribute("class", "viewer");
- webview.setAttribute("src", "https://signup2.na.leagueoflegends.com/en/signup/index?leagueUsername=" + leagueUsername + "&leaguePassword=" + leaguePassword);
- webview.setAttribute("preload", "controller.js");
- webview.setAttribute("disablewebsecurity", "true");
- location.appendChild(webview);
- checkViewer = setTimeout(chckViewer, 4000);
- }
- }
- function chckViewer() {
- if (document.querySelector(".viewer").src == "https://signup2.na.leagueoflegends.com/en/signup/download") {
- clearTimeout(checkViewer)
- var d = new Date();
- var date = d.getMonth() + 1 + "/" + d.getDate() + "/" + d.getFullYear();
- var table = document.querySelector("table");
- var tableArray = [leagueUsername, leaguePassword, leagueUsername + "@gmail.com", date, "11/7/1993", "Coming Soon...", "Coming Soon...", "Coming Soon..."];
- var row = table.insertRow(table.rows.length);
- tableArray.forEach(function(item, index) {
- var cell = row.insertCell(index);
- var text = document.createTextNode(item);
- cell.appendChild(text);
- });
- if (document.querySelector("#amount-remaining").innerHTML > 0) {
- postRateLimit();
- createAccount();
- startGen();
- } else {
- clearSettings();
- }
- } else {
- checkViewer = setTimeout(chckViewer, 4000);
- }
- }
- function postRateLimit() {
- var rateXHR = new XMLHttpRequest();
- rateXHR.open("POST", "http://TOj2EMmPGXBwjB:S0g9HYUTgNY6l6@plag-database.000webhostapp.com/rate_limit/get.php", true);
- rateXHR.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- rateXHR.onreadystatechange = function() {
- if (rateXHR.readyState == XMLHttpRequest.DONE) {
- document.querySelector("#amount-remaining").innerHTML = rateXHR.response;
- }
- }
- rateXHR.send("username=" + username + "&mode=post");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement