Fix check command host selection behavior

[SeeRM #8768] Instead of using the saved value for host, the check
command should use whatever the user specifies.
bug/bundler_fix
sinn3r 2014-03-12 22:54:01 -05:00
parent 5cf5643337
commit 84b08a5a35
1 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ module ModuleCommandDispatcher
# datastore option # datastore option
instance = mod.replicant instance = mod.replicant
instance.datastore['RHOST'] = tip.dup instance.datastore['RHOST'] = tip.dup
framework.events.on_module_created(instance) Msf::Simple::Framework.simplify_module(instance, false)
check_simple(instance) check_simple(instance)
} }
end end
@ -124,7 +124,7 @@ module ModuleCommandDispatcher
def cmd_check(*args) def cmd_check(*args)
defanged? defanged?
ip_range_arg = args.shift || framework.datastore['RHOSTS'] || mod.datastore['RHOSTS'] || '' ip_range_arg = args.shift || mod.datastore['RHOSTS'] || framework.datastore['RHOSTS'] || ''
hosts = Rex::Socket::RangeWalker.new(ip_range_arg) hosts = Rex::Socket::RangeWalker.new(ip_range_arg)
begin begin