The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

DESCRIPTION

This class represents a host as repsented by the output of an nmap scan.

PROPERTIES

status()

Whether the host is reachable or not: `up' or `down'

addresses()

Addresses of the host as determined by nmap (Nmap::Scanner::Address references).

add_address()

Add an address to the list of addresses for this host

hostname()

First hostname of the host as determined by nmap (single hostname string).

hostnames()

Hostnames of the host as determined by nmap (Array of Address references).

add_hostname()

Add a hostname to the list of hostnames for this host

smurf()

    True (1) if the host responded to a ping of a broadcast address and
    is therefore vulnerable to a Smurf-style attack.

extra_ports()

Nmap::Scanner::ExtraPorts instance associated with this host.

os()

holds a reference to an Nmap::Scanner::OS object that describes the operating system and TCP fingerprint for this host, as determined by nmap. Only present if guess_os() is called on the Nmap::Scanner::Scanner object AND nmap is able to determine the OS type via TCP fingerprinting. See the nmap manual for more details.

add_port($port_object_reference)

get_port($proto, $number)

Returns reference to requested port object.

get_udp_port($number)

Returns reference to requested UDP port object.

get_tcp_port($number)

Returns reference to requested TCP port object.

ENUMERATION METHODS

All these methods return lists of objects that can be enumration through using a while loop.

my $ports = $host->get_port_list();

while (my $p = $ports->get_next()) { # Do something with port reference here. }

get_port_list()

get_ip_port_list()

get_tcp_port_list()

get_udp_port_list()

distance()

The distance in hops this host is from the scanning host as estimated by nmap.