Sha256: 0c15e47763bc73033df2849d0ff77754f9ce617a21f7bd9681bddcadd0bb52ab
Contents?: true
Size: 1.11 KB
Versions: 7
Compression:
Stored size: 1.11 KB
Contents
require 'socket' require 'metasploit/aggregator/forwarder' require 'metasploit/aggregator/http/request' require 'metasploit/aggregator/http/responder' require 'metasploit/aggregator/logger' require 'metasploit/aggregator/router' module Metasploit module Aggregator class HttpForwarder < Forwarder CONNECTION_TIMEOUT = 60 # one minute def initialize super end def forward(connection) #forward input requests request_obj = Metasploit::Aggregator::Http::Responder.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::Responder.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.close end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems