Class: Mdm::NexposeConsole
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Mdm::NexposeConsole
- Defined in:
- app/models/mdm/nexpose_console.rb
Overview
A connection to Nexpose from Metasploit.
Instance Attribute Summary collapse
-
#address ⇒ String
Address on which Nexpose is running.
-
#cached_sites ⇒ Array<String>
List of sites known to Nexpose.
- #cert ⇒ String
-
#created_at ⇒ DateTime
When this Nexpose console was created.
-
#enabled ⇒ false, true
Whether metasploit tried to connect to this Nexpose console.
-
#name ⇒ String
Name of this Nexpose console to differentiate from other Nexpose consoles.
-
#owner ⇒ String
Name of user that setup this console.
-
#password ⇒ String
Password used to authenticate to Nexpose.
-
#port ⇒ Integer
Port on #address that Nexpose is running.
-
#status ⇒ String
Status of the connection to Nexpose.
-
#updated_at ⇒ DateTime
The last time this Nexpose console was updated.
-
#username ⇒ String
Username used to authenticate to Nexpose.
-
#version ⇒ String
The version of Nexpose.
Instance Method Summary collapse
-
#strip_protocol ⇒ void
Strips '
http://
' or'https://'
from #address.
Instance Attribute Details
#address ⇒ String
Address on which Nexpose is running.
|
# File 'app/models/mdm/nexpose_console.rb', line 17
|
#cached_sites ⇒ Array<String>
List of sites known to Nexpose.
92 |
# File 'app/models/mdm/nexpose_console.rb', line 92 serialize :cached_sites, MetasploitDataModels::Base64Serializer.new |
#cert ⇒ String
|
# File 'app/models/mdm/nexpose_console.rb', line 22
|
#created_at ⇒ DateTime
When this Nexpose console was created.
|
# File 'app/models/mdm/nexpose_console.rb', line 25
|
#enabled ⇒ false, true
Whether metasploit tried to connect to this Nexpose console.
|
# File 'app/models/mdm/nexpose_console.rb', line 30
|
#name ⇒ String
Name of this Nexpose console to differentiate from other Nexpose consoles.
|
# File 'app/models/mdm/nexpose_console.rb', line 36
|
#owner ⇒ String
Name of user that setup this console.
|
# File 'app/models/mdm/nexpose_console.rb', line 41
|
#password ⇒ String
Password used to authenticate to Nexpose.
|
# File 'app/models/mdm/nexpose_console.rb', line 47
|
#port ⇒ Integer
Port on #address that Nexpose is running.
|
# File 'app/models/mdm/nexpose_console.rb', line 53
|
#status ⇒ String
Status of the connection to Nexpose.
|
# File 'app/models/mdm/nexpose_console.rb', line 58
|
#updated_at ⇒ DateTime
The last time this Nexpose console was updated.
|
# File 'app/models/mdm/nexpose_console.rb', line 63
|
#username ⇒ String
Username used to authenticate to Nexpose.
|
# File 'app/models/mdm/nexpose_console.rb', line 68
|
#version ⇒ String
The version of Nexpose. Used to handle protocol difference in different versions of Nexpose.
|
# File 'app/models/mdm/nexpose_console.rb', line 73
|
Instance Method Details
#strip_protocol ⇒ void
This method returns an undefined value.
Strips 'http://
' or 'https://'
from #address.
115 116 117 |
# File 'app/models/mdm/nexpose_console.rb', line 115 def strip_protocol self.address.gsub!(/^http(s)*:\/\//i,'') unless self.address.nil? end |