Class: Msf::Plugin::Capture

Inherits:
Msf::Plugin show all
Defined in:
plugins/capture.rb

Overview

Combines several Metasploit modules related to spoofing names and capturing credentials into one plugin

Defined Under Namespace

Classes: ConsoleCommandDispatcher

Instance Attribute Summary

Attributes inherited from Msf::Plugin

#opts

Attributes included from Framework::Offspring

#framework

Instance Method Summary collapse

Methods inherited from Msf::Plugin

#add_console_dispatcher, create, #flush, #input, #output, #print, #print_error, #print_good, #print_line, #print_status, #print_warning, #remove_console_dispatcher

Constructor Details

#initialize(framework, opts) ⇒ Capture

Returns a new instance of Capture.



632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
# File 'plugins/capture.rb', line 632

def initialize(framework, opts)
  super
  add_console_dispatcher(ConsoleCommandDispatcher)
  filename = 'capture_config.yaml'
  user_config_file = File.join(Msf::Config.config_directory, filename)
  unless File.exist?(user_config_file)
    # Initialise user config file with the installed one
    base_config_file = File.join(Msf::Config.data_directory, filename)
    unless File.exist?(base_config_file)
      print_error('Plugin config file not found!')
      return
    end
    FileUtils.cp(base_config_file, user_config_file)
  end
end

Instance Method Details

#cleanupObject



648
649
650
# File 'plugins/capture.rb', line 648

def cleanup
  remove_console_dispatcher('HashCapture')
end

#descObject



656
657
658
# File 'plugins/capture.rb', line 656

def desc
  'Start all credential capture and spoofing services'
end

#nameObject



652
653
654
# File 'plugins/capture.rb', line 652

def name
  'Credential Capture'
end