Class: Metasploit::Aggregator::Http::SslRequester
- Defined in:
- lib/metasploit/aggregator/http/ssl_requester.rb
Instance Method Summary collapse
- #close_connection(connection) ⇒ Object
- #get_connection(host, port) ⇒ Object
-
#initialize(host, port) ⇒ SslRequester
constructor
A new instance of SslRequester.
Methods inherited from Requester
#process_request, #write_request
Constructor Details
#initialize(host, port) ⇒ SslRequester
Returns a new instance of SslRequester.
7 8 9 |
# File 'lib/metasploit/aggregator/http/ssl_requester.rb', line 7 def initialize(host, port) super(host, port) end |
Instance Method Details
#close_connection(connection) ⇒ Object
20 21 22 23 |
# File 'lib/metasploit/aggregator/http/ssl_requester.rb', line 20 def close_connection(connection) connection.sync_close = true connection.close end |
#get_connection(host, port) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/metasploit/aggregator/http/ssl_requester.rb', line 11 def get_connection(host, port) tcp_client = TCPSocket.new host, port ssl_context = OpenSSL::SSL::SSLContext.new ssl_context.ssl_version = :TLSv1 ssl_client = OpenSSL::SSL::SSLSocket.new tcp_client, ssl_context ssl_client.connect ssl_client end |