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.
2 parents 85d99d8 + 78148c7 commit 416a5cdCopy full SHA for 416a5cd
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? && mod.datastore['PAYLOAD']
1585
+ p = framework.payloads.create(mod.datastore['PAYLOAD'])
1586
+ warn_rhost = (p && !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