Imports System.Text.RegularExpressions
Public Class Form1
Dim s As IO.StreamWriter
Private Sub READMEToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles READMEToolStripMenuItem.Click
MsgBox("Read Me goes here if you'd like.")
End Sub
Private Sub HowToToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HowToToolStripMenuItem.Click
MsgBox("Tell how to use program here.") 'this is displayed if user clicks HowToToolStripMenuItem
End Sub
Private Sub LeechToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LeechToolStripMenuItem.Click
'This is where shit gets serious. Not really, just requests and responses.
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://elite-proxies.blogspot.com/search?updated-max") 'you can use most any Proxy site that has IP:PORT. I just chose this one ^^
Dim response As System.Net.HttpWebResponse = request.GetResponse
Dim sreader As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream()) 'response stream
Dim rste As String = sreader.ReadToEnd
Dim regex 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,4}") 'Regex, this is why we had to use "Imports System.Text.RegularExpressions"
Dim matches As MatchCollection = regex.Matches(rste)
For Each itemcode As Match In matches
ListBox1.Items.Add(itemcode) 'add the shit to the listbox
Next
MsgBox("Done!") 'tell user it's done.
End Sub
Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
'this will save the proxies to a .txt file called Proxies.txt
Dim i As Integer
s = New IO.StreamWriter(Application.StartupPath & "\Proxies.txt")
For i = 0 To ListBox1.Items.Count - 1
s.WriteLine(ListBox1.Items.Item(i)) 'write the lines
Next
s.Close()
End Sub
End Class