Class: Mdm::NexposeConsole

Inherits:
ApplicationRecord
  • 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.

Returns:

  • (String)


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

#cached_sitesArray<String>

List of sites known to Nexpose.

Returns:

  • (Array<String>)

    Array of site names.



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

serialize :cached_sites, MetasploitDataModels::Base64Serializer.new

#certString

Returns:

  • (String)


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

#created_atDateTime

When this Nexpose console was created.

Returns:

  • (DateTime)


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

#enabledfalse, 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 30

#nameString

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

Returns:

  • (String)


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

#ownerString

Returns:

  • (String)


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

#passwordString

Password used to authenticate to Nexpose.

Returns:

  • (String)


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

#portInteger

Port on #address that Nexpose is running.

Returns:

  • (Integer)


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

#statusString

Status of the connection to Nexpose.

Returns:

  • (String)


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

#updated_atDateTime

The last time this Nexpose console was updated.

Returns:

  • (DateTime)


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

#usernameString

Username used to authenticate to Nexpose.

Returns:

  • (String)


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

#versionString

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

Returns:

  • (String)


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

Instance Method Details

#strip_protocolvoid

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