class Nmap::Parser::Host::OS

This holds the OS information from OS Detection

Attributes

fingerprint[R]

OS fingerprint

Public Instance Methods

all_names()
Alias for: names
class_accuracy(index = 0) click to toggle source

Returns OS class accuracy of the first OS class record, or Nth record as specified by index

# File lib/nmap/parser.rb, line 1522
def class_accuracy(index = 0)
        (@osclasses[index.to_i] or return).accuracy
end
class_count() click to toggle source

Returns the number of OS class records

# File lib/nmap/parser.rb, line 1516
def class_count
        @osclasses.size
end
name(index = 0) click to toggle source

Returns name of first OS match record, or Nth record as specified by index

# File lib/nmap/parser.rb, line 1558
def name(index = 0)
        (@osmatches[index.to_i] or return).name
end
name_accuracy(index = 0) click to toggle source

Returns OS name accuracy of the first OS match record, or Nth record as specified by index

# File lib/nmap/parser.rb, line 1564
def name_accuracy(index = 0)
        (@osmatches[index.to_i] or return).accuracy
end
name_count() click to toggle source

Returns the number of OS match records

# File lib/nmap/parser.rb, line 1552
def name_count
        @osmatches.size
end
names() { |name| ... } click to toggle source

Returns an array of names from all OS records and yields them each to a block if one is given

# File lib/nmap/parser.rb, line 1570
def names() # :yields: name
        @osmatches.map do |match|
                yield match.name if block_given?
                match.name
        end
end
Also aliased as: all_names
osclasses() { |osclass| ... } click to toggle source

Returns an array of OSClass objects and yields them each to a block if one is given

# File lib/nmap/parser.rb, line 1503
def osclasses
        @osclasses.each { |osclass| yield osclass } if block_given?
        @osclasses
end
osfamily(index=0)() click to toggle source

Returns OS family information of first OS class record, or Nth record as specified by index

# File lib/nmap/parser.rb, line 1530
        
osgen(index=0)() click to toggle source

Returns OS generation information of first OS class record, or Nth record as specified by index

# File lib/nmap/parser.rb, line 1534
        
osmatches() { |osmatch| ... } click to toggle source

Returns an array of OSMatch objects and yields them each to a block if one is given

# File lib/nmap/parser.rb, line 1510
def osmatches
        @osmatches.each { |osmatch| yield osmatch } if block_given?
        @osmatches
end
ostype(index=0)() click to toggle source

Returns OS type information of the first OS class record, or Nth record as specified by index

# File lib/nmap/parser.rb, line 1538
        
osvendor(index=0)() click to toggle source

Returns OS vendor information of the first OS class record, or Nth record as specified by index

# File lib/nmap/parser.rb, line 1542
        
tcpport_closed() click to toggle source

Returns the closed TCP port used for this OS Detection run

# File lib/nmap/parser.rb, line 1580
def tcpport_closed
        getportnum("tcp", "closed")
end
tcpport_open() click to toggle source

Returns the open TCP port used for this OS Detection run

# File lib/nmap/parser.rb, line 1585
def tcpport_open
        getportnum("tcp", "open")
end
udpport_closed() click to toggle source

Returns the closed UDP port used for this OS Detection run

# File lib/nmap/parser.rb, line 1590
def udpport_closed
        getportnum("udp", "closed")
end