Exception: Metasploit::Framework::LoginScanner::Invalid

Inherits:
StandardError
  • Object
show all
Defined in:
lib/metasploit/framework/login_scanner/invalid.rb

Overview

This class is the generic Exception raised by LoginScanners when they fail validation. It rolls up all validation errors into a single exception so that all errors can be dealt with at once.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ Invalid

Returns a new instance of Invalid.


12
13
14
15
16
17
18
# File 'lib/metasploit/framework/login_scanner/invalid.rb', line 12

def initialize(model)
  @model = model

  errors = @model.errors.full_messages.join(', ')
  errors << " (#{model.class.to_s})"
  super(errors)
end

Instance Attribute Details

#modelObject (readonly)

Returns the value of attribute model


10
11
12
# File 'lib/metasploit/framework/login_scanner/invalid.rb', line 10

def model
  @model
end