A port scanner in VB

Discussion in 'Ethical hacking Tips' started by vishal sharma, Jul 29, 2005.

  1. vishal sharma

    vishal sharma New Member

    Joined:
    Jul 23, 2004
    Messages:
    106
    Likes Received:
    6
    Trophy Points:
    0
    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:
    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()
      List1.Clear
    End Sub
    
    Private Sub Timer1_Timer()
      On Error Resume Next
      Winsock1.Close
      Text2.Text = Int(Text2.Text) + 1
      Winsock1.RemoteHost = Text1.Text
      Winsock1.RemotePort = Text2.Text
      Winsock1.Connect
    End Sub
    
    Private Sub Winsock1_Connect()
     List1.AddItem Winsock1.RemotePort & " is open!"
    End Sub
    
    --------------------
    explanation:

    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
     
  2. hanleyhansen

    hanleyhansen New Member

    Joined:
    Jan 24, 2008
    Messages:
    336
    Likes Received:
    8
    Trophy Points:
    0
    Occupation:
    Drupal Developer/LAMP Developer
    Location:
    Clifton
    Home Page:
    http://www.hanseninfotech.com
    Looks good. I'll try it when I get home.
     
  3. Tatheon

    Tatheon New Member

    Joined:
    May 29, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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?
     
  4. n3tfire

    n3tfire New Member

    Joined:
    Jun 10, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Nice tutorial I've made something liek this before except it had a lot more features.
     
  5. Saseydon

    Saseydon New Member

    Joined:
    May 20, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Czech Republic
    Location:
    Czech Republic
    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.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice