CoolNode.js mule creating script

Posts 1–9 of 9 · Page 1 of 1
Node.js mule creating script
When I saw the PHP script to create mules, I was inspired to create a version with node.js. This is for those of you who don't want to dirty your hands with PHP (Yes, I am bias against PHP).

The script creates accounts for gmail addresses by adding random letters and numbers after your email and a "+". It also generates random passwords. After it creates the accounts, it formats the new accounts in an object to be accounts.js friendly. If you're picky about the output not being pretty, use jsbeautifier.

TO USE:
Create a file somewhere called "accountgen.js", paste this code in, and edit the last line for your email and desired amount of accounts. For those of you who can't scroll through and read, that's the line that says this: "accountGen('wildshadow', 5)". Change "wildshadow" to your gmail address without the @. Change 5 to the amount of accounts you want to create. Save the file and now navigate to the directory where the file is located. Run "npm install request", then "node accountgen.js". Congrats. Now you have a metric fuckton of mules.

Code:
"use strict";
var request = require('request'); //The module to make calls to ROTMG server, please run 'npm install request' first.
const baseUrl = 'http://realmofthemadgod.appspot.com/',
    lower = 'abcdefghijklmnopqrstuvwxyz',
    upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
    number = '0123456789',
    symbol = '_-!#$@'; //basic variables defined
var accList = {}; //to be filled with account info
var createdAcc = {}; //to be filled with accounts that were made successfully
function accountGen(base, total) { //the function to make accounts
    for (let i = 0; i < total; i++) {
        (function(i) {
            var email = `${base}+${randomValue(5, number + lower)}@gmail.com`;
            var pass = randomValue(11, `${lower}${upper}${number}${symbol})`);
            var info = {
                guid: randomValue(26, `${number}${upper}`),
                newGUID: email,
                ignore: randomValue(4, number),
                newPassword: pass,
                isAgeVerified: 1
            }
            accList[email] = pass;
            var accUrl = buildUrl(baseUrl + 'account/register', info);
            request(accUrl.substring(1, accUrl.length - 1), function(error, response, body) {
                if (!error && response.statusCode == 200) {
                    createdAcc[email] = pass;
                    console.log(`Account created! Email: ${email}, password: ${pass}`);
                    if (i == total - 1) done(); //We're done, call function to return list of accounts
                } else {
                    console.log(`${error}\n${body}`);
                }
            })
        })(i);
    }

    function done() { //list successfully made accounts in a format friendly for accounts.js
        console.log(`Put this in your accounts.js:\n${JSON.stringify(createdAcc)}`)
    }
}

function randomValue(len, charSet) { //random shit, move along
    var randomString = '';
    for (var i = 0; i < len; i++) {
        var randomPoz = Math.floor(Math.random() * charSet.length);
        randomString += charSet.substring(randomPoz, randomPoz + 1);
    }
    return randomString;
}

function buildUrl(url, parameters) { //build the url with all the information we need to send to ROTMG in order to create the mule
    var qs = "";
    for (var key in parameters) {
        var value = parameters[key];
        qs += encodeURIComponent(key) + "=" + encodeURIComponent(value) + "&";
    }
    if (qs.length > 0) {
        qs = qs.substring(0, qs.length - 1);
        url = url + "?" + qs;
    }
    return JSON.stringify(url);
}
accountGen('wildshadow', 5) //PUT YOUR EMAIL HERE WITHOUT @, AS THE FIRST ARGUMENT (must be gmail) AND THE AMOUNT OF ACCOUNTS TO CREATE AS SECOND, this is what calls the function to create your account.
Works like a charm! Thanks man!.

I didnt know you can add letters after + sign, I always used numbers, thanks for that

I'll add account naming feature myself and maybe output as a file or something. Didnt use Node Js that much, but im with you, I dont like php either
Agreed, I have a distaste about php.
This looks nice. Thanks mate.
I'm stupid, I have no idea how the hell I'm supposed to run "npm install request"

- I'll probably found out how to use node.js before I get a reply

- I have the necessary things installed, but now what?
 
Locating The File/Folder


 
Typing in the command


 
Results



Edit: Figured it out, sorry for wasting time xD It was self explanatory when I decided not to be retarded and look at the instructions as if it was supposed to be on one line.

- - - Updated - - -

Ok, so I tried the accounts and they all have incorrect password? I also received account verify requests on my gmail, which I verified and nothing happened still.


- - - Updated - - -

Weird thing was that I only received 4 at the same time? But I created 10 accounts


EDIT: It's Jumbled up turns out 4 of the accounts should work (Only tested 1 so far)
Thanks man very useful.
You're a beast, you deserve the thanks
Noiiiiiiice
Thanks, great work!
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?