class Nmap::Parser::Host::OS
Attributes
fingerprint[R]
OS fingerprint
Public Instance Methods
class_accuracy(index = 0)
click to toggle source
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
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
osgen(index=0)()
click to toggle source
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
osvendor(index=0)()
click to toggle source
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