Skip to content

Commit

Permalink
land #8069, a warning when setting rhost in rhosts modules
Browse files Browse the repository at this point in the history
  • Loading branch information
h00die committed Mar 7, 2017
2 parents 7e19486 + 1aec220 commit 9568371
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/msf/ui/console/command_dispatcher/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,16 @@ def cmd_set(*args)
end
end

# Warn when setting RHOST option for module which expects RHOSTS
if args.first.upcase.eql?('RHOST')
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?")
end
end
end

# Set the supplied name to the supplied value
name = args[0]
value = args[1, args.length-1].join(' ')
Expand Down

0 comments on commit 9568371

Please sign in to comment.