Check to ensure Mdm is loaded to fix store_loot.

bug/bundler_fix
joev 2015-03-05 23:27:13 -06:00
parent 141e2e732f
commit ca3b2220b5
1 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ module Msf::DBManager::Host
# address
#
def normalize_host(host)
return host if host.kind_of? ::Mdm::Host
return host if defined?(::Mdm) and host.kind_of? ::Mdm::Host
norm_host = nil
if (host.kind_of? String)
@ -92,7 +92,7 @@ module Msf::DBManager::Host
else
norm_host = Rex::Socket.getaddress(host, true)
end
elsif host.kind_of? ::Mdm::Session
elsif defined?(::Mdm) and host.kind_of? ::Mdm::Session
norm_host = host.host
elsif host.respond_to?(:session_host)
# Then it's an Msf::Session object