Main Page | Class List | File List | Class Members

CPortScanner Class Reference

#include <portscanner.h>

List of all members.

Public Member Functions

 CPortScanner (const char *host)
 ~CPortScanner ()
std::vector< int > doScan (int start=0, int end=1024)


Detailed Description

This is a simple TCP connection based port scanner which will attempt to connect to all the privileged ports upon a given host.

Privileged ports mean that the scanner will only attempt to connect to ports 0-1024.

Sample usage looks like this:

 CPortScanner object( "hostname" );
 std::vector< int > openPorts = object.doScan();

Version:
Id
portscanner.h,v 1.2 2005/10/18 00:39:07 steve Exp
Author:
Steve Kemp http://www.steve.org.uk/


Constructor & Destructor Documentation

CPortScanner::CPortScanner const char *  host  ) 
 

Constructor for this object.

Parameters:
host The machine to scan.
Returns:
A new CPortScanner object.

CPortScanner::~CPortScanner  ) 
 

Destructor.


Member Function Documentation

std::vector< int > CPortScanner::doScan int  start = 0,
int  end = 1024
 

Connect to each port in turn and return an STL vector of all open ports upon ths host.

Parameters:
start The starting port to scan from.
end The end port to scan until
Returns:
The vector containing all open ports


The documentation for this class was generated from the following files:
Generated on Tue Oct 25 23:04:38 2005 for fortress by  doxygen 1.4.2