Class: Metasploit::Credential::Realm

Inherits:
ApplicationRecord
  • Object
show all
Extended by:
ActiveSupport::Autoload
Includes:
Model::Search
Defined in:
app/models/metasploit/credential/realm.rb

Overview

The realm in which a Public can be used to authenticate or from which a Private was looted.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#coresActiveRecord::Relation<Metasploit::Credential::Core>

The core credentials that combine this realm with private credentials and/or public credentials gathered from the realm or used to authenticated to the realm.

Returns:



20
21
22
23
# File 'app/models/metasploit/credential/realm.rb', line 20

has_many :cores,
class_name: 'Metasploit::Credential::Core',
dependent: :destroy,
inverse_of: :realm

#created_atDateTime

When this realm was created.

Returns:

  • (DateTime)


# File 'app/models/metasploit/credential/realm.rb', line 29

#keyString

Note:

If a key is used more than once, it should be added to the Key constants and that constant should be used in place of the bare string.

The name of the key for the realm.

Returns:

  • (String)

    An element of ‘Metasploit::Model::Realm::Key::ALL`



# File 'app/models/metasploit/credential/realm.rb', line 34

#updated_atDateTime

The last time this realm was updated.

Returns:

  • (DateTime)


# File 'app/models/metasploit/credential/realm.rb', line 42

#valueString

The value of the #key for the realm.

Returns:

  • (String)


# File 'app/models/metasploit/credential/realm.rb', line 47

Class Method Details

.key_setSet<String>

Set of valid values for searching #key.

Returns:

  • (Set<String>)

    ‘Metasploit::Model::Realm::Key::ALL` as a `Set`.

See Also:

  • Model::Search::Operation::Set#membership
  • Model::Search::Operator::Attribute#attribute_set


87
88
89
# File 'app/models/metasploit/credential/realm.rb', line 87

def self.key_set
  @key_set ||= Set.new Metasploit::Model::Realm::Key::ALL
end

Instance Method Details

#to_sString

Returns:

  • (String)


96
97
98
# File 'app/models/metasploit/credential/realm.rb', line 96

def to_s
  value.to_s
end