Computing

[.NET] Proxy Grabber Tutorial

Submitted by Nasyr, , Thread ID: 3051

Thread Closed
Nasyr
Forum Janitor
Administrators
Level:
54
Reputation:
284
Posts:
8.05K
Likes:
959
Credits:
80
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

zGeek
Aokie
Prime
Level:
0
Reputation:
26
Posts:
782
Likes:
60
Credits:
1.46K
28-04-2015, 04:10 AM
#2
Great! May use this code in the future for a personal project.

RE: [.NET] Proxy Grabber Tutorial

Day
?
Prime
Level:
0
Reputation:
25
Posts:
433
Likes:
33
Credits:
525
09-05-2015, 07:10 PM
#3
Thanks for this Nasyr <3
UID: 799 I'm an oldfag.

RE: [.NET] Proxy Grabber Tutorial

skz0
Novice
Level:
0
Reputation:
1
Posts:
25
Likes:
0
Credits:
12
10-09-2015, 12:16 AM
#4
i dont personally like vbnet but thanks man i will learn about a bit

RE: [.NET] Proxy Grabber Tutorial

sennyx
Member
Level:
0
Reputation:
0
Posts:
132
Likes:
1
Credits:
8
12-09-2015, 03:39 AM
#5
thanks man appreciate

Users browsing this thread: 1 Guest(s)