Class: Nmap::Scan
- Inherits:
-
Object
- Object
- Nmap::Scan
- Defined in:
- lib/nmap/scan.rb
Instance Attribute Summary collapse
-
#protocol ⇒ Object
readonly
The protocol used for the scan.
-
#services ⇒ Object
readonly
The port numbers that were scanned.
-
#type ⇒ Object
readonly
The type of scan.
Instance Method Summary collapse
-
#initialize(type, protocol, services = []) ⇒ Scan
constructor
Creates a new Scan object.
-
#to_s ⇒ String
Converts the scan to a String.
Constructor Details
#initialize(type, protocol, services = []) ⇒ Scan
Creates a new Scan object.
25 26 27 28 29 |
# File 'lib/nmap/scan.rb', line 25 def initialize(type,protocol,services=[]) @type = type @protocol = protocol @services = services end |
Instance Attribute Details
#protocol ⇒ Object (readonly)
The protocol used for the scan
8 9 10 |
# File 'lib/nmap/scan.rb', line 8 def protocol @protocol end |
#services ⇒ Object (readonly)
The port numbers that were scanned
11 12 13 |
# File 'lib/nmap/scan.rb', line 11 def services @services end |
#type ⇒ Object (readonly)
The type of scan
5 6 7 |
# File 'lib/nmap/scan.rb', line 5 def type @type end |
Instance Method Details
#to_s ⇒ String
Converts the scan to a String.
37 38 39 |
# File 'lib/nmap/scan.rb', line 37 def to_s "#{@protocol} #{@type}" end |