Skip to content

Simple Port Scanner

Nick K

Asked Jul 29, 2008, 7:03 AM EDT3 answers
Share
LinkedInX

Hello I am interested in making a simple port scanner with an added bonus, telling me who/what is using the port along with the addresses.  I'm more so looking for a step in the right direction for what libraries to use/not use and maybe just some good code examples with things that work the best.  I have the port scanner written so really it is just the "whois" part that I could use some info on.  I have done some searching online but couldn't find much that was too helpful to me.  I am aware of netstat but would like to try and do this myself.

Thanks in advance for your help!

statman88

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Bechir Bejaoui
    +1
    You have to take a look on the System.IO.Ports;
    this namespace contains thoses elements:

    Classes

      Class Description
    SerialDataReceivedEventArgs Provides data for the DataReceived event.
    SerialErrorReceivedEventArgs Prepares data for the ErrorReceived event.
    SerialPinChangedEventArgs Provides data for the PinChanged event.
    SerialPort Represents a serial port resource.

    Delegates

      Delegate Description
    SerialDataReceivedEventHandler Represents the method that will handle the DataReceived event of a SerialPort object.
    SerialErrorReceivedEventHandler Represents the method that will handle the ErrorReceived event of a SerialPort object.
    SerialPinChangedEventHandler Represents the method that will handle the PinChanged event of a SerialPort object.

    Enumerations

      Enumeration Description
    Handshake Specifies the control protocol used in establishing a serial port communication for a SerialPort object.
    Parity Specifies the parity bit for a SerialPort object.
    SerialData Specifies the type of character that was received on the serial port of the SerialPort object.
    SerialError Specifies errors that occur on the SerialPort object
    SerialPinChange Specifies the type of change that occurred on the SerialPort object.
    StopBits

    the most imporant is how to use the Serial port class
    +1
  • Bechir Bejaoui
    +1
    You have to take a look on the System.IO.Ports;
    this namespace contains thoses elements:

    Classes

      Class Description
    SerialDataReceivedEventArgs Provides data for the DataReceived event.
    SerialErrorReceivedEventArgs Prepares data for the ErrorReceived event.
    SerialPinChangedEventArgs Provides data for the PinChanged event.
    SerialPort Represents a serial port resource.

    Delegates

      Delegate Description
    SerialDataReceivedEventHandler Represents the method that will handle the DataReceived event of a SerialPort object.
    SerialErrorReceivedEventHandler Represents the method that will handle the ErrorReceived event of a SerialPort object.
    SerialPinChangedEventHandler Represents the method that will handle the PinChanged event of a SerialPort object.

    Enumerations

      Enumeration Description
    Handshake Specifies the control protocol used in establishing a serial port communication for a SerialPort object.
    Parity Specifies the parity bit for a SerialPort object.
    SerialData Specifies the type of character that was received on the serial port of the SerialPort object.
    SerialError Specifies errors that occur on the SerialPort object
    SerialPinChange Specifies the type of change that occurred on the SerialPort object.
    StopBits

    the most imporant is how to use the Serial port class
    +1
  • 1 short reply
    • +1
      Thanks I will look into this!
      +1