Hello all, I made a program that randomly generates passwords, this program took about 5 minutes to make. It was really simple and I did it because I was bored.
Virus Scan:
File name: Password Generator.exe
Submission date: 2010-12-13 15:27:55 (UTC)
Current status: finished
Result: 0/ 43 (0.0%)
Source Code:
private void Form1_Load(object sender, EventArgs e)
{
}
Random rnd = new Random(); int[] symb = { 33, 35, 36, 37, 38, 42, 95 }; int length;
private void button1_Click(object sender, EventArgs e)
{
StringWriter sw = new StringWriter(); length = Convert.ToInt32(textBox1.Text);
for (; length > 0; length--)
{
switch (rnd.Next(1, 5))
{
case 1: sw.Write((char)rnd.Next(65, 91)); break;
case 2: sw.Write((char)rnd.Next(97, 123)); break;
case 3: sw.Write((char)rnd.Next(48, 58)); break;
case 4: sw.Write((char)symb[rnd.Next(0, 7)]); break;
}
}
textBox2.Text = sw.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
Clipboard.SetText(textBox2.Text);
}
private void label2_Click(object sender, EventArgs e)
{
MessageBox.Show("If you do not enter the Password Length it will not work!", "Help", MessageBoxButtons.OK, MessageBoxIcon.Question);
}
private void label3_Click(object sender, EventArgs e)
{
MessageBox.Show("Made by Hova @ https://www.wemod.com!", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}