Object
This holds session information, such as runtime, Nmap's arguments, and verbosity/debugging
Returns the total number of services that were scanned or, if an argument is given, returns the number of services scanned for type (e.g. "syn")
# File lib/nmap/parser.rb, line 374 def numservices(type = "") total = 0 @scaninfo.each do |info| if type.empty? total += info.numservices elsif info.type == type return info.numservices end end total end
Returns the protocol associated with the specified scan type (e.g. "tcp" for type "syn")
# File lib/nmap/parser.rb, line 390 def scan_type_proto(type) @scaninfo.each do |info| return info.proto if info.type == type end nil end
Returns an array of all the scan types performed, and passes them each to a block if one if given
# File lib/nmap/parser.rb, line 400 def scan_types() # :yields: scantype types = [] @scaninfo.each do |info| types << info.type yield info.type if block_given? end types end
Generated with the Darkfish Rdoc Generator 2.