Class Nmap::Parser::Host
In: lib/nmap/parser.rb
Parent: Object

This holds all of the information about a target host.

Status, IP/MAC addresses, hostnames, all that. Port information is available in this class; either accessed through here or directly from a Port object.

Methods

Classes and Modules

Class Nmap::Parser::Host::ExtraPorts
Class Nmap::Parser::Host::OS
Class Nmap::Parser::Host::Port
Class Nmap::Parser::Host::Script
Class Nmap::Parser::Host::Times
Class Nmap::Parser::Host::Traceroute

External Aliases

ip4_addr -> ipv4_addr
ip6_addr -> ipv6_addr

Attributes

distance  [R]  Network distance (not necessarily the same as from traceroute)
endtime  [R]  Host start and end times
ip4_addr  [R]  The IPv4 address
ip6_addr  [R]  The IPv6 address
ipidsequence_class  [R]  IPID Sequence Number information
ipidsequence_values  [R]  IPID Sequence Number information
mac_addr  [R]  The MAC address
mac_vendor  [R]  The MAC vendor
os  [R]  OS object holding Operating System information
reason  [R]  The reason for the status
smurf  [R]  The number of "weird responses"
starttime  [R]  Host start and end times
status  [R]  The status of the host, typically "up" or "down"
tcpsequence_class  [R]  TCP Sequence Number information
tcpsequence_difficulty  [R]  TCP Sequence Number information
tcpsequence_index  [R]  TCP Sequence Number information
tcpsequence_values  [R]  TCP Sequence Number information
tcptssequence_class  [R]  TCP Timestamp Sequence Number information
tcptssequence_values  [R]  TCP Timestamp Sequence Number information
times  [R]  Times object holding timing information
traceroute  [R]  Traceroute object
uptime_lastboot  [R]  Uptime information
uptime_seconds  [R]  Uptime information

Public Class methods

Public Instance methods

Returns the IPv4 or IPv6 address of host

Returns an array containing all of the hostnames for this host, and passes them each to a block if one is given

Returns an array of ExtraPorts objects, and passes them each to a block if one if given

Returns the first hostname, or nil if unavailable

hostnames()

Alias for all_hostnames

Returns the Port object for the IP protocol protonum, and passes it to a block if one is given

Returns an array of IP protocol numbers, and passes them each to a block if one given

If an argument is given, only protocols matching state are given.

Returns an array of Port objects for each IP protocol, and passes them each to a block if one is given

If an argument is given, only protocols matching state are given. Note that combinations like "open|filtered" will get matched by "open" and "filtered"

Returns the state reason of IP protocol protonum

Returns a Port::Service object for IP protocol protonum

Returns the state of IP protocol protonum

Returns the Script object for the specified host script name

Returns the output of the specified host script name

Returns an array of Script objects for each host script run, and passes them each to a block if given

Returns the Port object for the TCP port portnum, and passes it to a block if one is given

Returns an array of TCP port numbers, and passes them each to a block if one given

If an argument is given, only ports matching state are given.

Returns an array of Port objects for each TCP port, and passes them each to a block if one is given

If an argument is given, only ports matching state are given. Note that combinations like "open|filtered" will get matched by "open" and "filtered"

Returns the state reason of TCP port portnum

Returns the Script object for the script name run against the TCP port portnum

Returns the output of the script name on the TCP port portnum

Returns an array of Script objects for each script run on the TCP port portnum, and passes them each to a block if given

Returns a Port::Service object for TCP port portnum

Returns the state of TCP port portnum

Returns the Port object for the UDP port portnum, and passes it to a block if one is given

Returns an array of UDP port numbers, and passes them each to a block if one is given

If an argument is given, only ports matching state are given.

Returns an array of Port objects for each UDP port, and passes them each to a block if one is given

If an argument is given, only ports matching state are given. Note that combinations like "open|filtered" will get matched by "open" and "filtered"

Returns the state reason of UDP port portnum

Returns the Script object for the script name run against the UDP port portnum

Returns the output of the script name on the UDP port portnum

Returns an array of Script objects for each script run on the UDP port portnum, and passes them each to a block if given

Returns a Port::Service object for UDP port portnum

Returns the state of UDP port portnum

[Validate]