From c18c91ebcde67fa790874f433f3f3fc72ef5fa6a Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Thu, 24 May 2018 21:25:30 -0500 Subject: [PATCH] Add RHOSTS general option to Opt module --- lib/msf/core/opt.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/msf/core/opt.rb b/lib/msf/core/opt.rb index 8b968fca4c..7b5133f5d0 100644 --- a/lib/msf/core/opt.rb +++ b/lib/msf/core/opt.rb @@ -40,8 +40,12 @@ module Msf Msf::OptString.new(__method__.to_s, [ required, desc, default ]) end - # @return [OptAddress] - def self.RHOST(default=nil, required=true, desc="The target address") + # @return [OptAddressRange] + def self.RHOSTS(default=nil, required=true, desc="The target address range or CIDR identifier") + Msf::OptAddressRange.new('RHOSTS', [ required, desc, default ]) + end + + def self.RHOST(default=nil, required=true, desc="The target address range or CIDR identifier") Msf::OptAddressRange.new('RHOSTS', [ required, desc, default ], aliases: [ 'RHOST' ]) end @@ -107,6 +111,7 @@ module Msf LPORT = LPORT() Proxies = Proxies() RHOST = RHOST() + RHOSTS = RHOSTS() RPORT = RPORT() SSLVersion = SSLVersion() end