Class: Nmap::Service
- Inherits:
-
Object
- Object
- Nmap::Service
- Defined in:
- lib/nmap/service.rb
Overview
Wraps a service XML element.
Instance Method Summary collapse
-
#confidence ⇒ Integer
The confidence score of the service fingerprinting.
-
#fingerprint_method ⇒ Symbol
The fingerprint method used to identify the service.
-
#hostname ⇒ String
The hostname reported by the service.
-
#initialize(node) ⇒ Service
constructor
Creates a new OS object.
-
#name ⇒ String
(also: #to_s)
The name of the service.
-
#product ⇒ String
The product of the service.
-
#version ⇒ String
The version of the service.
Constructor Details
#initialize(node) ⇒ Service
Creates a new OS object.
15 16 17 |
# File 'lib/nmap/service.rb', line 15 def initialize(node) @node = node end |
Instance Method Details
#confidence ⇒ Integer
The confidence score of the service fingerprinting.
75 76 77 |
# File 'lib/nmap/service.rb', line 75 def confidence @confidence ||= @node.get_attribute('conf').to_i end |
#fingerprint_method ⇒ Symbol
The fingerprint method used to identify the service.
65 66 67 |
# File 'lib/nmap/service.rb', line 65 def fingerprint_method @fingerprint_method ||= @node.get_attribute('method').to_sym end |
#hostname ⇒ String
The hostname reported by the service.
55 56 57 |
# File 'lib/nmap/service.rb', line 55 def hostname @hostname ||= @node.get_attribute('hostname') end |
#name ⇒ String Also known as: to_s
The name of the service.
25 26 27 |
# File 'lib/nmap/service.rb', line 25 def name @name ||= @node.get_attribute('name') end |
#product ⇒ String
The product of the service.
35 36 37 |
# File 'lib/nmap/service.rb', line 35 def product @product ||= @node.get_attribute('product') end |
#version ⇒ String
The version of the service.
45 46 47 |
# File 'lib/nmap/service.rb', line 45 def version @version ||= @node.get_attribute('version') end |