module Metasploit::Credential::Importer::Base

Defines common attributes and helpers for all importers.

Constants

LONG_FORM_ALLOWED_PRIVATE_TYPE_NAMES

Whitelist of the {Metasploit::Credential::Private} subclass names allowed in long-form CSV imports.

SHORT_FORM_ALLOWED_PRIVATE_TYPE_NAMES

Whitelist of the {Metasploit::Credential::Private} subclass names allowed in short-form CSV imports.

Attributes

filename[RW]

@!attribute filename

The name of the file that is being imported
@return [String]
input[RW]

@!attribute input

An {IO} that holds the import data. {File} in normal usage, {StringIO} in testing
@return [IO]
origin[RW]

@!attribute origin

An {Metasploit::Credential::Origin} that represents the discrete
importation of this set of credential objects
@return [Metasploit::Credential::Origin::Import]
workspace[RW]

@!attribute workspace

The {Mdm::Workspace} that the credentials will be imported into
@return[Mdm::Workspace]

Public Class Methods

new(attributes={}) click to toggle source

@param attributes [Hash{Symbol => String,nil}]

# File lib/metasploit/credential/importer/base.rb, line 65
def initialize(attributes={})
  attributes.each do |attribute, value|
    public_send("#{attribute}=", value)
  end
end