Class: Mdm::NexposeConsole

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/mdm/nexpose_console.rb

Overview

A connection to Nexpose from Metasploit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressString

Address on which Nexpose is running.



# File 'app/models/mdm/nexpose_console.rb', line 18


#cached_sitesArray<String>

List of sites known to Nexpose.



93
# File 'app/models/mdm/nexpose_console.rb', line 93

serialize :cached_sites, MetasploitDataModels::Base64Serializer.new

#certString



# File 'app/models/mdm/nexpose_console.rb', line 23


#created_atDateTime

When this Nexpose console was created.



# File 'app/models/mdm/nexpose_console.rb', line 26


#enabledfalse, true

Whether metasploit tried to connect to this Nexpose console.



# File 'app/models/mdm/nexpose_console.rb', line 31


#nameString

Name of this Nexpose console to differentiate from other Nexpose consoles.



# File 'app/models/mdm/nexpose_console.rb', line 37


#ownerString



# File 'app/models/mdm/nexpose_console.rb', line 42


#passwordString

Password used to authenticate to Nexpose.



# File 'app/models/mdm/nexpose_console.rb', line 48


#portInteger

Port on #address that Nexpose is running.



# File 'app/models/mdm/nexpose_console.rb', line 54


#statusString

Status of the connection to Nexpose.



# File 'app/models/mdm/nexpose_console.rb', line 59


#updated_atDateTime

The last time this Nexpose console was updated.



# File 'app/models/mdm/nexpose_console.rb', line 64


#usernameString

Username used to authenticate to Nexpose.



# File 'app/models/mdm/nexpose_console.rb', line 69


#versionString

The version of Nexpose. Used to handle protocol difference in different versions of Nexpose.



# File 'app/models/mdm/nexpose_console.rb', line 74


Instance Method Details

#strip_protocolvoid

This method returns an undefined value.

Strips 'http://' or 'https://' from #address.



112
113
114
# File 'app/models/mdm/nexpose_console.rb', line 112

def strip_protocol
  self.address.gsub!(/^http(s)*:\/\//i,'')
end