Class: Nmap::Scanner

Inherits:
Object
  • Object
show all
Defined in:
lib/nmap/scanner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, version, arguments, start_time) ⇒ Scanner

Creates a new Scanner object.

Parameters:

  • name (String)

    The name of the scanner.

  • version (String)

    The version of the scanner.

  • arguments (String)

    The arguments used with the scanner.

  • start_time (Time)

    The time the scan begun



31
32
33
34
35
36
# File 'lib/nmap/scanner.rb', line 31

def initialize(name,version,arguments,start_time)
  @name = name
  @version = version
  @arguments = arguments
  @start_time = start_time
end

Instance Attribute Details

#argumentsObject (readonly)

The arguments used with the scanner



11
12
13
# File 'lib/nmap/scanner.rb', line 11

def arguments
  @arguments
end

#nameObject (readonly)

The name of the scanner



5
6
7
# File 'lib/nmap/scanner.rb', line 5

def name
  @name
end

#start_timeObject (readonly)

The time the scan begun



14
15
16
# File 'lib/nmap/scanner.rb', line 14

def start_time
  @start_time
end

#versionObject (readonly)

The version of the scanner



8
9
10
# File 'lib/nmap/scanner.rb', line 8

def version
  @version
end

Instance Method Details

#to_sString

Converts the scanner to a String.

Returns:

  • (String)

    The scanner name and arguments.



44
45
46
# File 'lib/nmap/scanner.rb', line 44

def to_s
  "#{@name} #{@arguments}"
end