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

#address ⇒ String

Address on which Nexpose is running.

Returns:

  • (String)


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


#cached_sites ⇒ Array<String>

List of sites known to Nexpose.

Returns:

  • (Array<String>) —

    Array of site names.



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

serialize :cached_sites, MetasploitDataModels::Base64Serializer.new

#cert ⇒ String

Returns:

  • (String)


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


#created_at ⇒ DateTime

When this Nexpose console was created.

Returns:

  • (DateTime)


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


#enabled ⇒ false, true

Whether metasploit tried to connect to this Nexpose console.

Returns:

  • (false) —

    is not allowed to connect.

  • (true) —

    is allowed to connect.



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


#name ⇒ String

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

Returns:

  • (String)


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


#owner ⇒ String

Returns:

  • (String)


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


#password ⇒ String

Password used to authenticate to Nexpose.

Returns:

  • (String)


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


#port ⇒ Integer

Port on #address that Nexpose is running.

Returns:

  • (Integer)


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


#status ⇒ String

Status of the connection to Nexpose.

Returns:

  • (String)


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


#updated_at ⇒ DateTime

The last time this Nexpose console was updated.

Returns:

  • (DateTime)


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


#username ⇒ String

Username used to authenticate to Nexpose.

Returns:

  • (String)


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


#version ⇒ String

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

Returns:

  • (String)


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


Instance Method Details

#strip_protocol ⇒ void

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