Land #8379, payload opts check for RHOST warning

bug/bundler_fix
William Vu 2017-05-14 22:21:58 -05:00
commit 416a5cdc3b
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
1 changed files with 8 additions and 1 deletions

View File

@ -1580,7 +1580,14 @@ class Core
mod = active_module
unless mod.nil?
if !mod.options.include?('RHOST') && mod.options.include?('RHOSTS')
print_warning("RHOST is not a valid option for this module. Did you mean RHOSTS?")
warn_rhost = false
if mod.exploit? && mod.datastore['PAYLOAD']
p = framework.payloads.create(mod.datastore['PAYLOAD'])
warn_rhost = (p && !p.options.include?('RHOST'))
else
warn_rhost = true
end
print_warning("RHOST is not a valid option for this module. Did you mean RHOSTS?") if warn_rhost
end
end
end