Use SSLVerifyMode and SSLCipher from the Exploit::Remote::Tcp mixin
parent
b206de7708
commit
4a9ef30e9e
|
@ -100,15 +100,17 @@ module Exploit::Remote::Tcp
|
|||
end
|
||||
|
||||
nsock = Rex::Socket::Tcp.create(
|
||||
'PeerHost' => opts['RHOST'] || rhost,
|
||||
'PeerPort' => (opts['RPORT'] || rport).to_i,
|
||||
'LocalHost' => opts['CHOST'] || chost || "0.0.0.0",
|
||||
'LocalPort' => (opts['CPORT'] || cport || 0).to_i,
|
||||
'SSL' => dossl,
|
||||
'SSLVersion' => opts['SSLVersion'] || ssl_version,
|
||||
'Proxies' => proxies,
|
||||
'Timeout' => (opts['ConnectTimeout'] || connect_timeout || 10).to_i,
|
||||
'Context' =>
|
||||
'PeerHost' => opts['RHOST'] || rhost,
|
||||
'PeerPort' => (opts['RPORT'] || rport).to_i,
|
||||
'LocalHost' => opts['CHOST'] || chost || "0.0.0.0",
|
||||
'LocalPort' => (opts['CPORT'] || cport || 0).to_i,
|
||||
'SSL' => dossl,
|
||||
'SSLVersion' => opts['SSLVersion'] || ssl_version,
|
||||
'SSLVerifyMode' => opts['SSLVerifyMode'] || ssl_verify_mode,
|
||||
'SSLCipher' => opts['SSLCipher'] || ssl_cipher,
|
||||
'Proxies' => proxies,
|
||||
'Timeout' => (opts['ConnectTimeout'] || connect_timeout || 10).to_i,
|
||||
'Context' =>
|
||||
{
|
||||
'Msf' => framework,
|
||||
'MsfExploit' => self,
|
||||
|
@ -269,6 +271,20 @@ module Exploit::Remote::Tcp
|
|||
datastore['ConnectTimeout']
|
||||
end
|
||||
|
||||
#
|
||||
# Returns the SSL certification verification mechanism
|
||||
#
|
||||
def ssl_verify_mode
|
||||
datastore['SSLVerifyMode']
|
||||
end
|
||||
|
||||
#
|
||||
# Returns the SSL cipher to use for the context
|
||||
#
|
||||
def ssl_cipher
|
||||
datastore['SSLCipher']
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
attr_accessor :sock
|
||||
|
|
Loading…
Reference in New Issue