Computing

[.NET] Proxy Grabber Tutorial

Submitted by Nasyr, , Thread ID: 3051

Thread Closed
19-04-2015, 08:29 PM
#1
Design:
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"
Please read the award requirements here before applying for them.
Rules and Regulations | Support Section | How to use Hide Tags
Don't message me to join a group, simply request to join one here.

RE: [.NET] Proxy Grabber Tutorial

#2
Great! May use this code in the future for a personal project.

RE: [.NET] Proxy Grabber Tutorial

#3
Thanks for this Nasyr <3
UID: 799 I'm an oldfag.

RE: [.NET] Proxy Grabber Tutorial

#4
i dont personally like vbnet but thanks man i will learn about a bit

RE: [.NET] Proxy Grabber Tutorial

#5
thanks man appreciate

Users browsing this thread: 4 Guest(s)