Skip to content

Commit 5316e0f

Browse files
committed
Land rapid7#4887, msfconsole -n store_loot fix
2 parents b79e99f + ca3b222 commit 5316e0f

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)