Sha256: 8bc200177986945b973180639667fa7f3b204ab79d849e08279ffb0231b5efeb

Contents?: true

Size: 1.14 KB

Versions: 8

Compression:

Stored size: 1.14 KB

Contents

require 'socket'
require 'openssl'
require 'metasploit/aggregator/forwarder'
require 'metasploit/aggregator/http/request'
require 'metasploit/aggregator/http/ssl_responder'
require 'metasploit/aggregator/logger'
require 'metasploit/aggregator/router'

module Metasploit
  module Aggregator

    class HttpsForwarder < Forwarder

      def initialize
        super
      end

      def forward(connection)
        #forward input requests
        request_obj = Metasploit::Aggregator::Http::SslResponder.get_data(connection, false)
        uri = Metasploit::Aggregator::Http::Request.parse_uri(request_obj)
        @forwarder_mutex.synchronize do
          unless uri.nil?
            unless @response_queues[uri]
              uri_responder = Metasploit::Aggregator::Http::SslResponder.new(uri)
              uri_responder.log_messages = @log_messages
              @response_queues[uri] = uri_responder
            end
            @response_queues[uri].queue << request_obj
            @response_queues[uri].time = Time.now
          else
            connection.sync_close = true
            connection.close
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metasploit-aggregator-1.0.0 lib/metasploit/aggregator/https_forwarder.rb
metasploit-aggregator-0.2.3 lib/metasploit/aggregator/https_forwarder.rb
metasploit-aggregator-0.2.2 lib/metasploit/aggregator/https_forwarder.rb
metasploit-aggregator-0.2.1 lib/metasploit/aggregator/https_forwarder.rb
metasploit-aggregator-0.2.0 lib/metasploit/aggregator/https_forwarder.rb
metasploit-aggregator-0.1.3 lib/metasploit/aggregator/https_forwarder.rb
metasploit-aggregator-0.1.2 lib/metasploit/aggregator/https_forwarder.rb
metasploit-aggregator-0.1.1 lib/metasploit/aggregator/https_forwarder.rb