Remove nesting in Msf::DBManager::ImportMsfXml

MSP-11124

Don't use nested modules to prevent Msf::DBManager::ImportMsfXml from
being the declaring location for Msf::DBManager.
This commit is contained in:
Luke Imhoff 2014-10-13 15:28:12 -05:00
parent ef04261686
commit b8ea44235b
No known key found for this signature in database
GPG Key ID: 5B1FB01FB33356F8
2 changed files with 546 additions and 551 deletions

View File

@ -15,7 +15,6 @@ require 'msf/base/config'
require 'msf/core' require 'msf/core'
require 'msf/core/database_event' require 'msf/core/database_event'
require 'msf/core/db_import_error' require 'msf/core/db_import_error'
require 'msf/core/db_manager/import_msf_xml'
require 'msf/core/db_manager/migration' require 'msf/core/db_manager/migration'
require 'msf/core/host_state' require 'msf/core/host_state'
require 'msf/core/service_state' require 'msf/core/service_state'
@ -37,6 +36,7 @@ class Msf::DBManager
autoload :HostDetail, 'msf/core/db_manager/host_detail' autoload :HostDetail, 'msf/core/db_manager/host_detail'
autoload :HostTag, 'msf/core/db_manager/host_tag' autoload :HostTag, 'msf/core/db_manager/host_tag'
autoload :Import, 'msf/core/db_manager/import' autoload :Import, 'msf/core/db_manager/import'
autoload :ImportMsfXml, 'msf/core/db_manager/import_msf_xml'
autoload :IPAddress, 'msf/core/db_manager/ip_address' autoload :IPAddress, 'msf/core/db_manager/ip_address'
autoload :Loot, 'msf/core/db_manager/loot' autoload :Loot, 'msf/core/db_manager/loot'
autoload :ModuleCache, 'msf/core/db_manager/module_cache' autoload :ModuleCache, 'msf/core/db_manager/module_cache'

View File

@ -1,12 +1,10 @@
# -*- coding: binary -*- # -*- coding: binary -*-
module Msf
class DBManager
# Handles importing of the xml format exported by Pro. The methods are in a # Handles importing of the xml format exported by Pro. The methods are in a
# module because (1) it's just good code layout and (2) it allows the # module because (1) it's just good code layout and (2) it allows the
# methods to be overridden in Pro without using alias_method_chain as # methods to be overridden in Pro without using alias_method_chain as
# methods defined in a class cannot be overridden by including a module # methods defined in a class cannot be overridden by including a module
# (unless you're running Ruby 2.0 and can use prepend) # (unless you're running Ruby 2.0 and can use prepend)
module ImportMsfXml module Msf::DBManager::ImportMsfXml
# #
# CONSTANTS # CONSTANTS
# #
@ -588,6 +586,3 @@ module Msf
end end
end end
end end
end
end