Parent

Nmap::Parser::Host::Port

This holds the information about an individual port or protocol

Attributes

num[R]

Port number

proto[R]

Port protocol (“tcp”, “udp”, etc)

service[R]

Service object for this port

state[R]

Port state (“open”, “closed”, “filtered”, etc)

reason[R]

Reason for the port state

reason_ip[R]

The host that responded, if different than the target

reason_ttl[R]

TTL from the responding host

Public Instance Methods

<=>(port) click to toggle source

Compares port numbers

# File lib/nmap/parser.rb, line 1269
        def <=>(port)
                @num <=> port.num
        end
script(name) click to toggle source

Returns the Script object with the specified name

# File lib/nmap/parser.rb, line 1248
        def script(name)
                @scripts.find { |script| script.id == name }
        end
script_output(name) click to toggle source

Returns the output of the script name

# File lib/nmap/parser.rb, line 1260
        def script_output(name)
                @scripts.each do |script|
                        return script.output if script.id == name
                end

                nil
        end
scripts() click to toggle source

Returns an array of Script objects associated with this port and yields them each to a block if one is given

# File lib/nmap/parser.rb, line 1254
        def scripts
                @scripts.each { |script| yield script } if block_given?
                @scripts
        end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.