Object
Returns an array of names from all OS records, and passes them each to a block if one is given
# File lib/nmap/parser.rb, line 1318 def all_names() # :yields: name names = [] @osmatches.each do |match| names << match.name yield match.name if block_given? end names end
Returns the number of OS class records
# File lib/nmap/parser.rb, line 1251 def class_count @osclasses.size end
Returns name of first OS match record, or Nth record as specified by index
# File lib/nmap/parser.rb, line 1302 def name(index = 0) return nil if @osmatches.empty? @osmatches[index.to_i].name end
Returns the number of OS match records
# File lib/nmap/parser.rb, line 1296 def name_count @osmatches.size end
Returns an array of OSClass objects, and passes them each to a block if one is given
# File lib/nmap/parser.rb, line 1236 def osclasses @osclasses.each { |osclass| yield osclass } if block_given? @osclasses end
Returns an array of OSMatch objects, and passes them each to a block if one is given
# File lib/nmap/parser.rb, line 1244 def osmatches @osmatches.each { |osmatch| yield osmatch } if block_given? @osmatches end
Returns the closed TCP port used for this OS Detection run
# File lib/nmap/parser.rb, line 1332 def tcpport_closed return nil if @portsused.nil? @portsused.each do |port| if port.proto == "tcp" and port.state == "closed" return port.num end end nil end
Returns the open TCP port used for this OS Detection run
# File lib/nmap/parser.rb, line 1345 def tcpport_open return nil if @portsused.nil? @portsused.each do |port| if port.proto == "tcp" and port.state == "open" return port.num end end nil end
Returns the closed UDP port used for this OS Detection run
# File lib/nmap/parser.rb, line 1358 def udpport_closed return nil if @portsused.nil? @portsused.each do |port| if port.proto == "udp" and port.state == "closed" return port.num end end nil end
Generated with the Darkfish Rdoc Generator 2.