Quick and Simple PortScanner
So guys, i was chilling in visual basic when i wanted to make a portscanner.
So i searched on google and found a couple of codes, mixed some parts together and enden up with this
Tutorial:
You Need:
1 Listbox - Show The Scanned Ports
2 Buttons - Start/Stop.
1 Textbox - Which Port It Should Start Scanning From.
1 Timer - The "PortScanner"
Should look like this
:

So i searched on google and found a couple of codes, mixed some parts together and enden up with this

Tutorial:
You Need:
1 Listbox - Show The Scanned Ports
2 Buttons - Start/Stop.
1 Textbox - Which Port It Should Start Scanning From.
1 Timer - The "PortScanner"
Should look like this
:Code:
Imports System.Net.Sockets
Public Class Form1
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Try
TextBox1.Text = TextBox1.Text + 1
Dim range As TcpClient = New TcpClient("127.0.0.1", TextBox1.Text)
If range.Connected = True Then
ListBox1.Items.Add(TextBox1.Text & " Is Open")
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1
End If
Catch ex As Exception
ListBox1.Items.Add(TextBox1.Text & " Is Closed")
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1
End Try
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer1.Enabled = False
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
ListBox1.Items.Clear()
End Sub
End Class
