Module: Msf::Opt
- Defined in:
- lib/msf/core/opt.rb
Overview
Builtin framework options with shortcut methods
Constant Summary collapse
- CHOST =
CHOST()
- CPORT =
CPORT()
- LHOST =
LHOST()
- LPORT =
LPORT()
- Proxies =
Proxies()
- RHOST =
RHOST()
- RHOSTS =
RHOSTS()
- RPORT =
RPORT()
- SSLVersion =
SSLVersion()
Class Method Summary collapse
- .CHOST(default = nil, required = false, desc = "The local client address") ⇒ OptAddress
- .CPORT(default = nil, required = false, desc = "The local client port") ⇒ OptPort
- .http_header_options ⇒ Object
- .http_proxy_options ⇒ Object
- .LHOST(default = nil, required = true, desc = "The listen address (an interface may be specified)") ⇒ OptAddressLocal
- .LPORT(default = nil, required = true, desc = "The listen port") ⇒ OptPort
- .Proxies(default = nil, required = false, desc = "A proxy chain of format type:host:port[,type:host:port][...]") ⇒ OptString
- .RHOST(default = nil, required = true, desc = "The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html") ⇒ Object
- .RHOSTS(default = nil, required = true, desc = "The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html") ⇒ OptRhosts
- .RPORT(default = nil, required = true, desc = "The target port") ⇒ OptPort
- .SSLVersion ⇒ OptEnum
- .stager_retry_options ⇒ Object
Class Method Details
.CHOST(default = nil, required = false, desc = "The local client address") ⇒ OptAddress
18 19 20 |
# File 'lib/msf/core/opt.rb', line 18 def self.CHOST(default=nil, required=false, desc="The local client address") Msf::OptAddress.new(__method__.to_s, [ required, desc, default ]) end |
.CPORT(default = nil, required = false, desc = "The local client port") ⇒ OptPort
23 24 25 |
# File 'lib/msf/core/opt.rb', line 23 def self.CPORT(default=nil, required=false, desc="The local client port") Msf::OptPort.new(__method__.to_s, [ required, desc, default ]) end |
.http_header_options ⇒ Object
101 102 103 104 105 106 107 |
# File 'lib/msf/core/opt.rb', line 101 def self. [ OptString.new('HttpHostHeader', 'An optional value to use for the Host HTTP header'), OptString.new('HttpCookie', 'An optional value to use for the Cookie HTTP header'), OptString.new('HttpReferer', 'An optional value to use for the Referer HTTP header') ] end |
.http_proxy_options ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/msf/core/opt.rb', line 78 def self. [ OptString.new('HttpProxyHost', 'An optional proxy server IP address or hostname', aliases: ['PayloadProxyHost'] ), OptPort.new('HttpProxyPort', 'An optional proxy server port', aliases: ['PayloadProxyPort'] ), OptString.new('HttpProxyUser', 'An optional proxy server username', aliases: ['PayloadProxyUser'], max_length: Rex::Payloads::Meterpreter::Config::PROXY_USER_SIZE - 1 ), OptString.new('HttpProxyPass', 'An optional proxy server password', aliases: ['PayloadProxyPass'], max_length: Rex::Payloads::Meterpreter::Config::PROXY_PASS_SIZE - 1 ), OptEnum.new('HttpProxyType', 'The type of HTTP proxy', enums: ['HTTP', 'SOCKS'], aliases: ['PayloadProxyType'] ) ] end |
.LHOST(default = nil, required = true, desc = "The listen address (an interface may be specified)") ⇒ OptAddressLocal
28 29 30 |
# File 'lib/msf/core/opt.rb', line 28 def self.LHOST(default=nil, required=true, desc="The listen address (an interface may be specified)") Msf::OptAddressLocal.new(__method__.to_s, [ required, desc, default ]) end |
.LPORT(default = nil, required = true, desc = "The listen port") ⇒ OptPort
33 34 35 |
# File 'lib/msf/core/opt.rb', line 33 def self.LPORT(default=nil, required=true, desc="The listen port") Msf::OptPort.new(__method__.to_s, [ required, desc, default ]) end |
.Proxies(default = nil, required = false, desc = "A proxy chain of format type:host:port[,type:host:port][...]") ⇒ OptString
38 39 40 |
# File 'lib/msf/core/opt.rb', line 38 def self.Proxies(default=nil, required=false, desc="A proxy chain of format type:host:port[,type:host:port][...]") Msf::OptString.new(__method__.to_s, [ required, desc, default ]) end |
.RHOST(default = nil, required = true, desc = "The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html") ⇒ Object
47 48 49 |
# File 'lib/msf/core/opt.rb', line 47 def self.RHOST(default=nil, required=true, desc="The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html") Msf::OptRhosts.new('RHOSTS', [ required, desc, default ], aliases: [ 'RHOST' ]) end |
.RHOSTS(default = nil, required = true, desc = "The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html") ⇒ OptRhosts
43 44 45 |
# File 'lib/msf/core/opt.rb', line 43 def self.RHOSTS(default= nil, required=true, desc="The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html") Msf::OptRhosts.new('RHOSTS', [ required, desc, default ], aliases: [ 'RHOST' ]) end |
.RPORT(default = nil, required = true, desc = "The target port") ⇒ OptPort
52 53 54 |
# File 'lib/msf/core/opt.rb', line 52 def self.RPORT(default=nil, required=true, desc="The target port") Msf::OptPort.new(__method__.to_s, [ required, desc, default ]) end |
.SSLVersion ⇒ OptEnum
57 58 59 60 61 62 |
# File 'lib/msf/core/opt.rb', line 57 def self.SSLVersion Msf::OptEnum.new('SSLVersion', 'Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate)', enums: Rex::Socket::SslTcp.supported_ssl_methods ) end |
.stager_retry_options ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/msf/core/opt.rb', line 64 def self. [ OptInt.new('StagerRetryCount', 'The number of times the stager should retry if the first connect fails', default: 10, aliases: ['ReverseConnectRetries'] ), OptInt.new('StagerRetryWait', 'Number of seconds to wait for the stager between reconnect attempts', default: 5 ) ] end |