Skip to content

Commit ca3b222

Browse files
committed
Check to ensure Mdm is loaded to fix store_loot.
1 parent 141e2e7 commit ca3b222

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/core/db_manager/host.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def hosts(wspace = workspace, only_up = false, addresses = nil)
7373
# address
7474
#
7575
def normalize_host(host)
76-
return host if host.kind_of? ::Mdm::Host
76+
return host if defined?(::Mdm) and host.kind_of? ::Mdm::Host
7777
norm_host = nil
7878

7979
if (host.kind_of? String)
@@ -92,7 +92,7 @@ def normalize_host(host)
9292
else
9393
norm_host = Rex::Socket.getaddress(host, true)
9494
end
95-
elsif host.kind_of? ::Mdm::Session
95+
elsif defined?(::Mdm) and host.kind_of? ::Mdm::Session
9696
norm_host = host.host
9797
elsif host.respond_to?(:session_host)
9898
# Then it's an Msf::Session object

0 commit comments

Comments
 (0)