We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f39e378 commit 70bfdf1Copy full SHA for 70bfdf1
lib/msf/ui/console/command_dispatcher/core.rb
@@ -1580,7 +1580,14 @@ def cmd_set(*args)
1580
mod = active_module
1581
unless mod.nil?
1582
if !mod.options.include?('RHOST') && mod.options.include?('RHOSTS')
1583
- print_warning("RHOST is not a valid option for this module. Did you mean RHOSTS?")
+ warn_rhost = false
1584
+ if (mod.exploit? and mod.datastore['PAYLOAD'])
1585
+ p = framework.payloads.create(mod.datastore['PAYLOAD'])
1586
+ warn_rhost = (p and !p.options.include?('RHOST'))
1587
+ else
1588
+ warn_rhost = true
1589
+ end
1590
+ print_warning("RHOST is not a valid option for this module. Did you mean RHOSTS?") if warn_rhost
1591
end
1592
1593
0 commit comments