Here a little tutorial to explain how to generate random email addys for catchalls for webbrowser bots
In your code find
Code:
public partial class Form1 : Form
{
under it add (in between the "" add your words separated by a comma for example "word1,word2,word3,word3"
find the following
Code:
public Form1()
{
InitializeComponent();
}
under it add
Code:
private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
}
static string RandomNumber()
{
Random RandomClass = new Random();
int RandomNumber = 0;
RandomNumber = RandomClass.Next(1, 13);
return RandomNumber.ToString();
}
static class RandomLetterNum
{
static Random _random = new Random();
public static char GetLetter()
{
// This method returns a random lowercase letter.
// ... Between 'a' and 'z' inclusize.
int number = _random.Next(1, 9); // Zero to 25
char num = (char)('1' + number);
return num;
}
}
now for the page that has the form you wanna fill out put this
Code:
string[] words1 = words.Split(',');
string catchall = words1[RandomNumber(1, 20000)] + words1[RandomNumber(1, 14523)] + RandomLetterNum.GetLetter() + RandomLetterNum.GetLetter() + RandomLetterNum.GetLetter() + RandomLetterNum.GetLetter();
label21.Text = catchall + email.Text;
the 20000 and the 14523 depend how how many words your word list is. if your word list is 50000 words you could use for the first one 50000 then for the second one something like 25555. the reason you dont want to use 50000 twice is because it will use the same word twice since the "random" inst completely random. so for example you your code should look something like this
Code:
private void browser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
if (browser.DocumentText.Contains("Complete The Follow For Entry"))
{
string[] words1 = words.Split(',');
string catchall = words1[RandomNumber(1, 20000)] + words1[RandomNumber(1, 14523)] + RandomLetterNum.GetLetter() + RandomLetterNum.GetLetter() + RandomLetterNum.GetLetter() + RandomLetterNum.GetLetter();
browser.Document.GetElementById("Firstname").SetAttribute("value", first.Text);
browser.Document.GetElementById("Lastname").SetAttribute("value", last.Text);
browser.Document.GetElementById("Email").SetAttribute("value", catchall + email.Text);
}
}
that pretty much sums it up. if you want to display what email is being used you can do something like this instead
Code:
private void browser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
if (browser.DocumentText.Contains("Complete The Follow For Entry"))
{
string[] words1 = words.Split(',');
string catchall = words1[RandomNumber(1, 20000)] + words1[RandomNumber(1, 14523)] + RandomLetterNum.GetLetter() + RandomLetterNum.GetLetter() + RandomLetterNum.GetLetter() + RandomLetterNum.GetLetter();
label1.Text = catchall + email.Text
browser.Document.GetElementById("Firstname").SetAttribute("value", first.Text);
browser.Document.GetElementById("Lastname").SetAttribute("value", last.Text);
browser.Document.GetElementById("Email").SetAttribute("value", label1.Text);
}
}
this methd will create an email that looks like this: wordword1234@catchall.com