Module: Metasploit::Credential::Importer::Base

Extended by:
ActiveSupport::Concern
Included in:
Core, Multi, Pwdump, Zip
Defined in:
lib/metasploit/credential/importer/base.rb

Overview

Defines common attributes and helpers for all importers.

Constant Summary collapse

LONG_FORM_ALLOWED_PRIVATE_TYPE_NAMES =

Whitelist of the Private subclass names allowed in long-form CSV imports.

[
Metasploit::Credential::NonreplayableHash,
Metasploit::Credential::NTLMHash,
Metasploit::Credential::Password,
Metasploit::Credential::PostgresMD5,
Metasploit::Credential::SSHKey].map(&:name)
SHORT_FORM_ALLOWED_PRIVATE_TYPE_NAMES =

Whitelist of the Private subclass names allowed in short-form CSV imports.

[
Metasploit::Credential::NonreplayableHash,
Metasploit::Credential::NTLMHash,
Metasploit::Credential::Password,
Metasploit::Credential::PostgresMD5].map(&:name)

Instance Method Summary collapse

Instance Method Details

#initialize(attributes = {}) ⇒ Object

Parameters:

  • attributes (Hash{Symbol => String,nil}) (defaults to: {})


65
66
67
68
69
# File 'lib/metasploit/credential/importer/base.rb', line 65

def initialize(attributes={})
  attributes.each do |attribute, value|
    public_send("#{attribute}=", value)
  end
end