Module: Msf::Simple::Framework::PluginManager

Defined in:
lib/msf/base/simple/framework.rb

Overview

Extends the framework.plugins class instance to automatically check in the framework plugin's directory.

Instance Method Summary collapse

Instance Method Details

#load(path, opts = {}) ⇒ Object

Loads the supplied plugin by checking to see if it exists in the framework default plugin path as necessary.


30
31
32
33
34
35
36
37
38
# File 'lib/msf/base/simple/framework.rb', line 30

def load(path, opts = {})
  def_path = Msf::Config.plugin_directory + File::SEPARATOR + path

  if (File.exists?(def_path) or File.exists?(def_path + ".rb"))
    super(def_path, opts)
  else
    super
  end
end