Sha256: 9b335a74d66dced39677963f5484c055cbba6c173b647941d8477c63de22e0eb
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 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 attr_accessor :log_messages attr_reader :response_queues 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
metasploit-aggregator-0.1.1 | lib/metasploit/aggregator/http_forwarder.rb |