fix autotargeting failure

the fallback to the original default was failing because
it was assuming rhost was already set, so it would always
go back to the first default target. now the auto_target? method
only returns true if can pull an auto_target_host
bug/bundler_fix
David Maloney 2017-01-10 14:06:44 -06:00
parent 18347a8de7
commit 38a4c2aa97
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ module Msf
def auto_target? def auto_target?
selected_target = targets[target_index] selected_target = targets[target_index]
return false if selected_target.nil? return false if selected_target.nil?
if selected_target.name =~ /Automatic/ && selected_target['AutoGenerated'] == true if selected_target.name =~ /Automatic/ && selected_target['AutoGenerated'] == true && auto_target_host
true true
else else
false false