Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO
- Imports System.Net
- Public Class Form1
- Dim count As Integer = 0
- Private Function checkName(ByVal name As String) As Boolean
- count += 1
- Label3.Text = "Requests Sent: " & count
- Dim address As String = "https://minecraft.net/haspaid.jsp?user=" & name
- Dim client As WebClient = New WebClient()
- Dim reader As StreamReader = New StreamReader(client.OpenRead(address))
- RichTextBox1.Text = reader.ReadToEnd
- If RichTextBox1.Text = True Then
- Return False
- End If
- Return True
- End Function
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- ListBox1.Items.Clear()
- ProgressBar1.Value = 0
- If RadioButton1.Checked Then
- Do While ListBox1.Items.Count < CInt(TextBox1.Text)
- Dim s As String = lettersOnly(3, False)
- If checkName(s) = True Then
- ListBox1.Items.Add(s)
- ProgressBar1.Value += 1
- End If
- Loop
- MsgBox("Done")
- ProgressBar1.Value = ProgressBar1.Value
- End If
- If RadioButton2.Checked Then
- Do While ListBox1.Items.Count < CInt(TextBox1.Text)
- Dim s As String = numbersOnly(3, False)
- If checkName(s) = True Then
- ListBox1.Items.Add(s)
- ProgressBar1.Value += 1
- End If
- Loop
- MsgBox("Done")
- ProgressBar1.Value = ProgressBar1.Value
- End If
- If RadioButton3.Checked Then
- Do While ListBox1.Items.Count < CInt(TextBox1.Text)
- Dim s As String = both(3, False)
- If checkName(s) = True Then
- ListBox1.Items.Add(s)
- ProgressBar1.Value += 1
- End If
- Loop
- MsgBox("Done")
- ProgressBar1.Value = ProgressBar1.Value
- End If
- If RadioButton4.Checked Then
- Do While ListBox1.Items.Count < CInt(TextBox1.Text)
- Dim s As String = all(3, False)
- If checkName(s) = True Then
- ListBox1.Items.Add(s)
- ProgressBar1.Value += 1
- End If
- Loop
- MsgBox("Done")
- ProgressBar1.Value = ProgressBar1.Value
- End If
- End Sub
- Public Function both(ByRef len As Integer, ByRef upper As Boolean) As String
- Dim rand As New Random()
- Dim allowableChars() As Char = "abcdefghijklmnopqrstuvwxyz1234567890".ToCharArray()
- Dim final As String = String.Empty
- For i As Integer = 0 To len - 1
- final += allowableChars(rand.Next(allowableChars.Length - 1))
- Next
- Return IIf(upper, final.ToUpper(), final)
- End Function
- Public Function lettersOnly(ByRef len As Integer, ByRef upper As Boolean) As String
- Dim rand As New Random()
- Dim allowableChars() As Char = "abcdefghijklmnopqrstuvwxyz".ToCharArray()
- Dim final As String = String.Empty
- For i As Integer = 0 To len - 1
- final += allowableChars(rand.Next(allowableChars.Length - 1))
- Next
- Return IIf(upper, final.ToUpper(), final)
- End Function
- Public Function numbersOnly(ByRef len As Integer, ByRef upper As Boolean) As String
- Dim rand As New Random()
- Dim allowableChars() As Char = "1234567890".ToCharArray()
- Dim final As String = String.Empty
- For i As Integer = 0 To len - 1
- final += allowableChars(rand.Next(allowableChars.Length - 1))
- Next
- Return IIf(upper, final.ToUpper(), final)
- End Function
- Public Function all(ByRef len As Integer, ByRef upper As Boolean) As String
- Dim rand As New Random()
- Dim allowableChars() As Char = "abcdefghijklmnopqrstuvwxyz1234567890_".ToCharArray()
- Dim final As String = String.Empty
- For i As Integer = 0 To len - 1
- final += allowableChars(rand.Next(allowableChars.Length - 1))
- Next
- Return IIf(upper, final.ToUpper(), final)
- End Function
- Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.Validated
- ProgressBar1.Maximum = CInt(TextBox1.Text)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement