Class: ScanDB::Host
Constant Summary
Constants included from Model
Instance Method Summary collapse
-
#best_class_guess ⇒ Object
Returns the best OS Class guess.
-
#best_match_guess ⇒ Object
Returns the best OS Match guess.
-
#closed_ports ⇒ Object
Returns all the closed ports on the host.
-
#filtered_ports ⇒ Object
Returns all the filtered ports on the host.
-
#host_name ⇒ Object
Returns the primary host name.
-
#open_ports ⇒ Object
(also: #ports)
Returns all the open ports on the host.
-
#port_numbers ⇒ Object
Returns the ports numbers of all open ports on the host.
-
#services ⇒ Object
Returns the services of all open ports on the host.
-
#to_s ⇒ Object
Returns the IP address of the host in String form.
Methods included from Model
Instance Method Details
#best_class_guess ⇒ Object
Returns the best OS Class guess.
69 70 71 |
# File 'lib/scandb/host.rb', line 69 def best_class_guess os_class_guesses.first end |
#best_match_guess ⇒ Object
Returns the best OS Match guess.
76 77 78 |
# File 'lib/scandb/host.rb', line 76 def best_match_guess os_match_guesses.first end |
#closed_ports ⇒ Object
Returns all the closed ports on the host.
97 98 99 |
# File 'lib/scandb/host.rb', line 97 def closed_ports scanned_ports.all(:status => :closed) end |
#filtered_ports ⇒ Object
Returns all the filtered ports on the host.
90 91 92 |
# File 'lib/scandb/host.rb', line 90 def filtered_ports scanned_ports.all(:status => :filtered) end |
#host_name ⇒ Object
Returns the primary host name.
62 63 64 |
# File 'lib/scandb/host.rb', line 62 def host_name names.first end |
#open_ports ⇒ Object Also known as: ports
Returns all the open ports on the host.
83 84 85 |
# File 'lib/scandb/host.rb', line 83 def open_ports scanned_ports.all(:status => :open) end |
#port_numbers ⇒ Object
Returns the ports numbers of all open ports on the host.
106 107 108 |
# File 'lib/scandb/host.rb', line 106 def port_numbers open_ports.map { |port| port.number } end |
#services ⇒ Object
Returns the services of all open ports on the host.
113 114 115 |
# File 'lib/scandb/host.rb', line 113 def services ports.service end |
#to_s ⇒ Object
Returns the IP address of the host in String form.
120 121 122 |
# File 'lib/scandb/host.rb', line 120 def to_s ip end |