Jun 21, 2015 03:11 AM
(This post was last modified: Jun 21, 2015 03:23 AM by Who Soup.)
Here is the basics on how to automate a random identity for an account creation form. Warning: I'll be going into great detail!
For this project I will be using a hotmail account creation form. This may sound stupid but you will see why this is important in the future. You can use this link for reference: https://signup.live.com/
![[Image: 3aaee962ebe1154b60b24f47b9cc0135.png]](https://gyazo.com/3aaee962ebe1154b60b24f47b9cc0135.png)
So we can see that this form requires a first name, last name, username, password, reenter password, county (it's filled in automatically so you can skip this), birthday (MM/DD/YYYY), gender, and phone number or email. Most account creation forms require these basic types of information. Some may include more some may have less. It all depends on the website.
so to generate a random ID we can either have a large list of information which loops through and chooses at random and blacklists used identities or we can take a easier route and just do some basic scraping. To generate our random identity we will be using a website called http://www.fakenamegenerator.com/
So lets first make a sub to scrape it
For this example I'll be using a webclient to download the source where I can sort through it later.
Don't forget to import system.net!
Congrats, you just downloaded the source of the website! 🤗
To confirm this (and to see the source) you can call a messagebox which will display the source.
Lets now look through that source so we can find what we want and extract just that section out of the full source and input that later on. For this section I'll be using regex..
If you don't know what regex is, just think of it like this; Say you have a block of text in HTML that we want in our case it's this:
we want to get the text "NameHere"
So what we do is first imports system.text.regularexpressions (so we can use regex)
then, we need to name this block of code as a regex
When regexing HTML make sure you have the full sub in our case its the 3rd header starting brackets (<h3>) and closing brackets (</h3>)
Now what ever we want to save we want to replace that with a period star no spaces.
now our new regex statement should look like this:
Now shit gets tricky.
We want to now split this and call it a string. The best way to explain this you have an index, and 0 means "its self" and 1 means forward. 2 is 2 forward, 3 is 3 forward, you get the picture. So this is what our string statement will look like then I'll explain what it means:
So first we're diming (or calling) this text or string "nameraw" (make sure that's not in a sub so we can use it through out the class. So the name nameraw is that regex (which was <h3></h3>) which is in the source from there we want the 1st character over from the first ">" then up until the end of the first "<".
Not too bad eh? 😁
Now for this next part you need to know how fakenamegenerator works. Every time you refresh the page you will get a new identity. So you want to make a button, and every time you push this button you want to run through that code that scrapes a identity. So put your code under that button.
Now we have our webbrowser (this is the easy part)
we first want our webbrowser to load as the form starts up and navigate to the page so we can just push the button and we're in action.
Next under that button (after our ID generation code; You can even make this in a seperate sub and call it under the button so it looks cleaner) you look back onto the page and see what that textbox is called in our case it's called "firstname" and input that first name data that you scraped using this:
Do this for every option that you need to fill out then to submit the data just find the submit button and invoke a click!
That's it! you successfully automated the account creation process 🤗
Now just save this to a list of string or listview and export using system.io to a .txt and you're in business.
Thank you for reading this tutorial and I hope it helped at least one of you as it took me over a hour to write this 🎉
For this project I will be using a hotmail account creation form. This may sound stupid but you will see why this is important in the future. You can use this link for reference: https://signup.live.com/
![[Image: 3aaee962ebe1154b60b24f47b9cc0135.png]](https://gyazo.com/3aaee962ebe1154b60b24f47b9cc0135.png)
So we can see that this form requires a first name, last name, username, password, reenter password, county (it's filled in automatically so you can skip this), birthday (MM/DD/YYYY), gender, and phone number or email. Most account creation forms require these basic types of information. Some may include more some may have less. It all depends on the website.
so to generate a random ID we can either have a large list of information which loops through and chooses at random and blacklists used identities or we can take a easier route and just do some basic scraping. To generate our random identity we will be using a website called http://www.fakenamegenerator.com/
So lets first make a sub to scrape it
Code
Private Sub createID
end subFor this example I'll be using a webclient to download the source where I can sort through it later.
Don't forget to import system.net!
Code
imports system.netCode
Dim wc As New WebClient
Dim source As String = wc.DownloadString("http://www.fakenamegenerator.com/")Congrats, you just downloaded the source of the website! 🤗
To confirm this (and to see the source) you can call a messagebox which will display the source.
Code
messagebox.show(source)Lets now look through that source so we can find what we want and extract just that section out of the full source and input that later on. For this section I'll be using regex..
If you don't know what regex is, just think of it like this; Say you have a block of text in HTML that we want in our case it's this:
Code
<h3>NameHere<h3>we want to get the text "NameHere"
So what we do is first imports system.text.regularexpressions (so we can use regex)
Code
imports system.text.regularexpressionsthen, we need to name this block of code as a regex
Code
Dim nameregex As New Regex("<h3>NameHere</h3>")When regexing HTML make sure you have the full sub in our case its the 3rd header starting brackets (<h3>) and closing brackets (</h3>)
Now what ever we want to save we want to replace that with a period star no spaces.
Code
.*now our new regex statement should look like this:
Code
Dim nameregex As New Regex("<h3>.*</h3>")Now shit gets tricky.
We want to now split this and call it a string. The best way to explain this you have an index, and 0 means "its self" and 1 means forward. 2 is 2 forward, 3 is 3 forward, you get the picture. So this is what our string statement will look like then I'll explain what it means:
Code
Dim nameraw As String = nameregex.Matches(source)(0).Value.Split(">")(1).Split("<")(0)So first we're diming (or calling) this text or string "nameraw" (make sure that's not in a sub so we can use it through out the class. So the name nameraw is that regex (which was <h3></h3>) which is in the source from there we want the 1st character over from the first ">" then up until the end of the first "<".
Not too bad eh? 😁
Now for this next part you need to know how fakenamegenerator works. Every time you refresh the page you will get a new identity. So you want to make a button, and every time you push this button you want to run through that code that scrapes a identity. So put your code under that button.
Now we have our webbrowser (this is the easy part)
we first want our webbrowser to load as the form starts up and navigate to the page so we can just push the button and we're in action.
Code
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("https://signup.live.com")
End SubCode
WebBrowser1.Document.GetElementById("FirstName").SetAttribute("value", nameraw)Do this for every option that you need to fill out then to submit the data just find the submit button and invoke a click!
Code
WebBrowser1.Document.GetElementById("submit").InvokeMember("click")That's it! you successfully automated the account creation process 🤗
Now just save this to a list of string or listview and export using system.io to a .txt and you're in business.
Thank you for reading this tutorial and I hope it helped at least one of you as it took me over a hour to write this 🎉

