Class: Nmap::TcpSequence

Inherits:
Sequence show all
Defined in:
lib/nmap/tcp_sequence.rb

Overview

Represents a TCP sequence number.

Since:

  • 0.5.0

Instance Method Summary collapse

Methods inherited from Sequence

#description, #initialize, #values

Constructor Details

This class inherits a constructor from Nmap::Sequence

Instance Method Details

#difficultyString

Returns The difficulty description from nmap.

Returns:

  • (String)

    The difficulty description from nmap

Since:

  • 0.5.0



29
30
31
# File 'lib/nmap/tcp_sequence.rb', line 29

def difficulty
  @node['difficulty']
end

#indexNumeric

Returns The difficulty index from nmap.

Returns:

  • (Numeric)

    The difficulty index from nmap

Since:

  • 0.5.0



17
18
19
20
21
# File 'lib/nmap/tcp_sequence.rb', line 17

def index
  @index ||= if (index_string = @node['index'])
               index_string.to_i
             end
end

#to_sString

Converts the TcpSequence class to a String.

Returns:

  • (String)

    The String form of the object.

Since:

  • 0.5.0



41
42
43
# File 'lib/nmap/tcp_sequence.rb', line 41

def to_s
  "index=#{index} difficulty=#{difficulty.inspect} values=#{values.inspect}"
end