Class: Mdm::Service
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Mdm::Service
- Defined in:
- app/models/mdm/service.rb
Overview
A service, such as an ssh server or web server, running on a #host.
Constant Summary collapse
- STATES =
Valid values for #state.
['open', 'closed', 'filtered', 'unknown']
Instance Attribute Summary collapse
-
#creds ⇒ Array<Mdm::Cred>
Credentials gathered from this service.
- #exploited_hosts ⇒ Array<Mdm::ExploitHost>
-
#host ⇒ Mdm::Host
The host on which this service runs.
- #info ⇒ String
-
#name ⇒ String
The name of the service.
-
#notes ⇒ Array<Mdm::Note>
Notes about this service.
-
#port ⇒ Integer
The port on which this service runs on the #host.
-
#proto ⇒ String
The protocol used by this service.
-
#state ⇒ String
Whether this service is opened, closed, filtered, or in an unknown state.
-
#vulns ⇒ Array<Mdm::Vuln>
Vulnerabilities found in this service.
-
#web_forms ⇒ Array<Mdm::WebForm>
readonly
Form in the #web_sites on top of this service.
-
#web_pages ⇒ Array<Mdm::WebPages>
readonly
Web pages in the #web_sites on top of this service.
-
#web_sites ⇒ Array<Mdm::WebSite>
Web sites running on top of this service.
-
#web_vulns ⇒ Array<Mdm::WebVuln>
readonly
Vulnerabilities found in the #web_sites on top of this service.
Instance Method Summary collapse
-
#normalize_host_os ⇒ void
Normalizes the host operating system whenever #info has changed.
Instance Attribute Details
#creds ⇒ Array<Mdm::Cred>
Credentials gathered from this service.
18 |
# File 'app/models/mdm/service.rb', line 18 has_many :creds, :dependent => :destroy, :class_name => 'Mdm::Cred' |
#exploited_hosts ⇒ Array<Mdm::ExploitHost>
23 |
# File 'app/models/mdm/service.rb', line 23 has_many :exploited_hosts, :dependent => :destroy, :class_name => 'Mdm::ExploitedHost' |
#host ⇒ Mdm::Host
The host on which this service runs.
29 |
# File 'app/models/mdm/service.rb', line 29 belongs_to :host, :class_name => 'Mdm::Host', :counter_cache => :service_count |
#info ⇒ String
|
|
# File 'app/models/mdm/service.rb', line 75
|
#name ⇒ String
The name of the service.
|
|
# File 'app/models/mdm/service.rb', line 85
|
#notes ⇒ Array<Mdm::Note>
Notes about this service.
35 |
# File 'app/models/mdm/service.rb', line 35 has_many :notes, :dependent => :destroy, :class_name => 'Mdm::Note' |
#port ⇒ Integer
The port on which this service runs on the #host.
|
|
# File 'app/models/mdm/service.rb', line 80
|
#proto ⇒ String
The protocol used by this service
|
|
# File 'app/models/mdm/service.rb', line 90
|
#state ⇒ String
Whether this service is opened, closed, filtered, or in an unknown state.
|
|
# File 'app/models/mdm/service.rb', line 95
|
#vulns ⇒ Array<Mdm::Vuln>
Vulnerabilities found in this service.
41 |
# File 'app/models/mdm/service.rb', line 41 has_many :vulns, :dependent => :destroy, :class_name => 'Mdm::Vuln' |
#web_forms ⇒ Array<Mdm::WebForm> (readonly)
Form in the #web_sites on top of this service.
63 |
# File 'app/models/mdm/service.rb', line 63 has_many :web_forms, :through => :web_sites, :class_name => 'Mdm::WebForm' |
#web_pages ⇒ Array<Mdm::WebPages> (readonly)
Web pages in the #web_sites on top of this service.
57 |
# File 'app/models/mdm/service.rb', line 57 has_many :web_pages, :through => :web_sites, :class_name => 'Mdm::WebPage' |
#web_sites ⇒ Array<Mdm::WebSite>
Web sites running on top of this service.
47 |
# File 'app/models/mdm/service.rb', line 47 has_many :web_sites, :dependent => :destroy, :class_name => 'Mdm::WebSite' |
#web_vulns ⇒ Array<Mdm::WebVuln> (readonly)
Vulnerabilities found in the #web_sites on top of this service.
69 |
# File 'app/models/mdm/service.rb', line 69 has_many :web_vulns, :through => :web_sites, :class_name => 'Mdm::WebVuln' |
Instance Method Details
#normalize_host_os ⇒ void
This method returns an undefined value.
Normalizes the host operating system whenever #info has changed.
126 127 128 129 130 |
# File 'app/models/mdm/service.rb', line 126 def normalize_host_os if info_changed? host.normalize_os end end |