use RHOSTS in many places where we used RHOST

GSoC/Meterpreter_Web_Console
Brent Cook 2017-11-28 04:25:15 -06:00
parent b9e0b628ef
commit b456cd2c8c
2 changed files with 1 additions and 18 deletions

View File

@ -42,7 +42,7 @@ module Msf
# @return [OptAddress]
def self.RHOST(default=nil, required=true, desc="The target address")
Msf::OptAddress.new(__method__.to_s, [ required, desc, default ])
Msf::OptAddressRange.new('RHOSTS', [ required, desc, default ], aliases: [ 'RHOST' ])
end
# @return [OptPort]

View File

@ -1590,23 +1590,6 @@ class Core
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')
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
# Set the supplied name to the supplied value
name = args[0]
value = args[1, args.length-1].join(' ')