Go4Expert (http://www.go4expert.com/)
-   Ethical hacking Tips (http://www.go4expert.com/articles/ethical-hacking-tutorials/)
-   -   A port scanner in VB (http://www.go4expert.com/articles/port-scanner-vb-t401/)

vishal sharma 29Jul2005 22:33

A port scanner in VB
small but effective tool(if u know the rite way to use it..u might do wonders..)

you need:

2 textboxes
1 listbox
3 commandbuttons
1 timer
1 winsock control
Code: VB

Private Sub Command1_Click()
  Timer1.Enabled = True
End Sub

Private Sub Command2_Click()
  Timer1.Enabled = False
  Text2.Text = "0"
End Sub

Private Sub Command3_Click()
End Sub

Private Sub Timer1_Timer()
  On Error Resume Next
  Text2.Text = Int(Text2.Text) + 1
  Winsock1.RemoteHost = Text1.Text
  Winsock1.RemotePort = Text2.Text
End Sub

Private Sub Winsock1_Connect()
 List1.AddItem Winsock1.RemotePort & " is open!"
End Sub


text1 = IP to scan
text2 = starting port
list1 = list where all open ports are shown
command1 = start
command2 = stop and reset
command3 = clear port list
timer1 = will make the winsock control to try ports

hanleyhansen 25Jan2008 21:07

Re: A port scanner in VB
Looks good. I'll try it when I get home.

Tatheon 29May2009 16:15

Re: A port scanner in VB
this lokos great, im a complete beginner, in what program do i create this (atm i am using Microsoft Visual Basic 2008) and where can i find the command buttons and winsock control?

n3tfire 10Jun2009 05:20

Re: A port scanner in VB
Nice tutorial I've made something liek this before except it had a lot more features.

Saseydon 12Jun2009 23:06

A port scanner in VB
Tis hokay.This has inspired me to create a port scanner in PHP, of which, every time you scan you will have a proxy for yourself, namely, my site.I still like this one, though.I think Ill use Perl to develop most of my tools from here on in. And, if I get good enough, start porting them to C.

All times are GMT +5.5. The time now is 00:30.