Class: Metasploit::Credential::Public

Inherits:
ApplicationRecord
  • Object
show all
Includes:
Model::Search
Defined in:
app/models/metasploit/credential/public.rb

Overview

A publicly disclosed credential, i.e. a #username.

Direct Known Subclasses

BlankUsername, Username

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

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

The core credentials that combine this public credential with its derived private credential and/or realm.

Returns:



14
15
16
17
# File 'app/models/metasploit/credential/public.rb', line 14

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

#created_atDateTime

When this credential was created.

Returns:

  • (DateTime)


# File 'app/models/metasploit/credential/public.rb', line 23

#updated_atDateTime

The last time this credential was updated.

Returns:

  • (DateTime)


# File 'app/models/metasploit/credential/public.rb', line 28

#usernameString

The username for this credential

Returns:

  • (String)


# File 'app/models/metasploit/credential/public.rb', line 33

Instance Method Details

#to_sString

A string suitable for displaying to the user

Returns:

  • (String)


68
69
70
# File 'app/models/metasploit/credential/public.rb', line 68

def to_s
  username.to_s
end