class Nmap::Task

## Nmap options:

### Target Specifications:

### Host Discovery:

### Port Scanning Techniques:

### Port Specification and Scan Order:

### Service/Version Detection:

### Script Scan:

### OS Detection:

### Timing and Performance:

### Firewall/IDS Evasion and Spoofing:

### Output:

### Verbosity and Debugging:

### Miscellaneous Output:

### Misc:

@see nmap.org/book/man.html

Private Class Methods

format_port_list(ports) click to toggle source

Fomats a port list.

@param [Array<Integer,Range>] ports

The port ranges.

@return [String]

Comma separated string.
# File lib/nmap/task.rb, line 354
def self.format_port_list(ports)
  ports.map { |port|
    case port
    when Range
      "#{port.first}-#{port.last}"
    else
      port.to_s
    end
  }.join(',')
end
format_protocol_list(protocols) click to toggle source

Formats a protocol list.

@param [Array<Integer,Range>] protocols

The IP protocol numbers.

@return [String]

Comma separated string.
# File lib/nmap/task.rb, line 374
def self.format_protocol_list(protocols)
  # NOTE: the man page says the protocol list is similar to the format of
  # a port range.
  format_port_list(protocols)
end