[VB]Port Scanner

This is a discussion on [VB]Port Scanner within the Development board part of the Software/Hardware and Mobile Phones category; Alright lets start by opening Visual Basic, and than starting a new "Standard EXE" Next place the following on your ...

Results 1 to 2 of 2
  1. #1
    Bendik is offline Banned User Array
    Join Date
    Dec 2007
    Location
    I live in a small village up north in Norway, Called Beiarn (Google pictures it!)
    Posts
    290
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    260

    [VB]Port Scanner

    Alright lets start by opening Visual Basic, and than starting a new "Standard EXE"

    Next place the following on your standard exe.

    2 Text boxes

    name the two text boxes "Text1", and "Text2"

    Next place a list box on your form, and name it "List1"

    Now place 3 command buttons on your form and name them "Command1" "Command2" "Command3"



    Now place a timer on your form and name it "Timer1"

    Than place a winsock componet your form and name it "Winsock1" if you dont have the winsock button on your component bar, you can add it by right clicking on the bar and scrolling to components, and adding it from the component list, it should be called "Microsoft Winsock Control 6.0 (SP6)"

    Alright now lets put captions on our ****, caption command1 as "Start Scan" and caption command2 as "Stop Scan" and caption command3 as "Clear"

    Now Add The Following Code
    Code:
     Private Sub Form_Load()
    Timer1.Interval = 1
    Timer1.Enabled = False
    Text2.Text = "0"
    End Sub
    Private Sub Timer1_Timer()
    On Error Resume Next
    Winsock1.Close
    Text2.Text = Text2.Text + 1
    Winsock1.RemoteHost = Text1.Text
    Winsock1.RemotePort = Text2.Text
    Winsock1.Connect
    End Sub
    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 Winsock1_Connect()
    List1.AddItem Winsock1.RemotePort & " is open!"
    End Sub

  2. #2
    PinkHair is offline Banned User Array
    Join Date
    Mar 2008
    Location
    NET
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    54
    may someone recode for c++ ?

Similar Threads

  1. Replies: 2
    Last Post: 06-24-2007, 07:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •