Skip to content

Commit b02e1f6

Browse files
author
Brent Cook
committed
Land rapid7#5274, don't rely on rhost being defined
2 parents 3cfe812 + b41aa0e commit b02e1f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/ui/console/module_command_dispatcher.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def cmd_check(*args)
132132
hosts = Rex::Socket::RangeWalker.new(opt.normalize(ip_range_arg))
133133

134134
# Check multiple hosts
135-
last_rhost_opt = mod.rhost
135+
last_rhost_opt = mod.datastore['RHOST']
136136
last_rhosts_opt = mod.datastore['RHOSTS']
137137
mod.datastore['RHOSTS'] = ip_range_arg
138138
begin
@@ -169,7 +169,7 @@ def check_simple(instance=nil)
169169
instance = mod
170170
end
171171

172-
rhost = instance.rhost
172+
rhost = instance.datastore['RHOST']
173173
rport = nil
174174
peer = rhost
175175
if instance.datastore['rport']

0 commit comments

Comments
 (0)