1) Add 3 Buttons.
Button 1 ---> Grab Proxies
Button 2 ---> Save Proxies
Button 3 ---> Clear Proxies
2) Add A ListBox (Proxies will be collected here)
3) Add A Label (Shows total proxies grabbed)
Coding
Code:
Imports System.Text.RegularExpressions
Imports System.Text
Then Click Button 1 (Grab Proxies) & Add:
Code:
Dim the_request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://proxy-ip-list.com/")
Dim the_response As System.Net.HttpWebResponse = the_request.GetResponse
Dim stream_reader As System.IO.StreamReader = New System.IO.StreamReader(the_response.GetResponseStream())
Dim code As String = stream_reader.ReadToEnd
Dim expression As New System.Text.RegularExpressions.Regex("[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}:[0-9]{1,5}")
Dim mtac As MatchCollection = expression.Matches(code)
For Each itemcode As Match In mtac
ListBox1.Items.Add(itemcode)
Next
Label1.Text = ListBox1.Items.Count.ToString
Click Button 2 & Add:
Code:
If ListBox1.Items.Count = (0) Then
MessageBox.Show("No Proxies found, Please try grabbing again", "ALERT!", MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
Dim S_W As IO.StreamWriter
'Creating a steamwriter to save files
Dim itms() As String = {ListBox1.Items.ToString}
Dim save As New SaveFileDialog
Dim it As Integer
save.FileName = "Proxies - Server 2"
save.Filter = "(*.txt)|*.txt|ALL Files (*.*)|*.*"
save.CheckPathExists = True
save.ShowDialog(Me)
S_W = New IO.StreamWriter(save.FileName)
For it = 0 To ListBox1.Items.Count - 1
S_W.WriteLine(ListBox1.Items.Item(it))
Next
S_W.Close()
End If
Finally, Double click the third button & Add:
Code:
ListBox1.Items.Clear()
Label1.Text = "0"