some slight changes

bug/bundler_fix
Christian Mehlmauer 2015-12-29 16:05:29 +01:00
parent 0546911eef
commit 02841c79c3
1 changed files with 14 additions and 17 deletions

View File

@ -98,12 +98,9 @@ class Msf::Modules::Loader::Base
# @option options [Boolean] :reload (false) whether this is a reload.
#
# @return [false] if :force is false and parent_path has not changed.
# @return [false] if exception encountered while parsing module
# content
# @return [false] if the module is incompatible with the Core or API
# version.
# @return [false] if the module does not implement a Metasploit(\d+)
# class.
# @return [false] if exception encountered while parsing module content
# @return [false] if the module is incompatible with the Core or API version.
# @return [false] if the module does not implement a Metasploit class.
# @return [false] if the module's is_usable method returns false.
# @return [true] if all those condition pass and the module is
# successfully loaded.
@ -149,13 +146,13 @@ class Msf::Modules::Loader::Base
end
if namespace_module.const_defined?('Metasploit3', false)
klass = namespace_module.const_get('Metasploit3')
klass = namespace_module.const_get('Metasploit3', false)
load_warning(module_path, 'Please change the modules class name from Metasploit3 to Metasploit')
elsif namespace_module.const_defined?('Metasploit4', false)
klass = namespace_module.const_get('Metasploit4')
klass = namespace_module.const_get('Metasploit4', false)
load_warning(module_path, 'Please change the modules class name from Metasploit4 to Metasploit')
elsif namespace_module.const_defined?('Metasploit', false)
klass = namespace_module.const_get('Metasploit')
klass = namespace_module.const_get('Metasploit', false)
else
load_error(module_path, Msf::Modules::Error.new({
:module_path => module_path,
@ -316,9 +313,9 @@ class Msf::Modules::Loader::Base
protected
# Returns a nested module to wrap the Metasploit(1|2|3) class so that it doesn't overwrite other (metasploit)
# Returns a nested module to wrap the Metasploit class so that it doesn't overwrite other (metasploit)
# module's classes. The wrapper module must be named so that active_support's autoloading code doesn't break when
# searching constants from inside the Metasploit(1|2|3) class.
# searching constants from inside the Metasploit class.
#
# @param namespace_module_names [Array<String>]
# {NAMESPACE_MODULE_NAMES} + <derived-constant-safe names>
@ -498,7 +495,7 @@ class Msf::Modules::Loader::Base
end
# Returns an Array of names to make a fully qualified module name to
# wrap the Metasploit(1|2|3) class so that it doesn't overwrite other
# wrap the Metasploit class so that it doesn't overwrite other
# (metasploit) module's classes. Invalid module name characters are
# escaped by using 'H*' unpacking and prefixing each code with X so
# the code remains a valid module name when it starts with a digit.