No longer track module archive paths, since the manager will load them from the main dir

This commit is contained in:
HD Moore 2011-11-28 22:27:21 -06:00
parent 591ef73f7d
commit 626389f5ba
2 changed files with 1 additions and 40 deletions

View File

@ -52,7 +52,6 @@ class Config < Hash
'ConfigDirectory' => get_config_root, 'ConfigDirectory' => get_config_root,
'ConfigFile' => "config", 'ConfigFile' => "config",
'ModuleDirectory' => "modules", 'ModuleDirectory' => "modules",
'ModuleArchive' => "modules.fastlib",
'ScriptDirectory' => "scripts", 'ScriptDirectory' => "scripts",
'LogDirectory' => "logs", 'LogDirectory' => "logs",
'SessionLogDirectory' => "logs/sessions", 'SessionLogDirectory' => "logs/sessions",
@ -88,13 +87,6 @@ class Config < Hash
def self.module_directory def self.module_directory
self.new.module_directory self.new.module_directory
end end
#
# Calls the instance method.
#
def self.module_archive
self.new.module_archive
end
# #
# Calls the instance method. # Calls the instance method.
@ -151,13 +143,6 @@ class Config < Hash
def self.user_module_directory def self.user_module_directory
self.new.user_module_directory self.new.user_module_directory
end end
#
# Calls the instance method.
#
def self.user_module_archive
self.new.user_module_archive
end
# #
# Calls the instance method. # Calls the instance method.
@ -250,13 +235,6 @@ class Config < Hash
install_root + FileSep + self['ModuleDirectory'] install_root + FileSep + self['ModuleDirectory']
end end
#
# Returns the global module archive.
#
def module_archive
install_root + FileSep + self['ModuleArchive']
end
# #
# Returns the path that scripts can be loaded from. # Returns the path that scripts can be loaded from.
# #
@ -305,13 +283,6 @@ class Config < Hash
def user_module_directory def user_module_directory
config_directory + FileSep + "modules" config_directory + FileSep + "modules"
end end
#
# Returns the user-specific module archive
#
def user_module_archive
config_directory + FileSep + "modules.fastlib"
end
# #
# Returns the user-specific plugin base path # Returns the user-specific plugin base path

View File

@ -112,21 +112,11 @@ module Framework
framework.modules.add_module_path(Msf::Config.module_directory) framework.modules.add_module_path(Msf::Config.module_directory)
end end
# Initialize the default module archive paths # Initialize the user module search path
if Msf::Config.module_archive and ::File.exists?(Msf::Config.module_archive)
framework.modules.add_module_path(Msf::Config.module_archive)
end
# Initialize the user module archive search path
if (Msf::Config.user_module_directory) if (Msf::Config.user_module_directory)
framework.modules.add_module_path(Msf::Config.user_module_directory) framework.modules.add_module_path(Msf::Config.user_module_directory)
end end
# Initialize the user module archive path
if Msf::Config.user_module_archive and ::File.exists?(Msf::Config.user_module_archive)
framework.modules.add_module_path(Msf::Config.user_module_archive)
end
# If additional module paths have been defined globally, then load them. # If additional module paths have been defined globally, then load them.
# They should be separated by semi-colons. # They should be separated by semi-colons.
if framework.datastore['MsfModulePaths'] if framework.datastore['MsfModulePaths']