Class: Metasploit::Aggregator::Forwarder
- Inherits:
-
Object
- Object
- Metasploit::Aggregator::Forwarder
- Defined in:
- lib/metasploit/aggregator/forwarder.rb
Direct Known Subclasses
Constant Summary collapse
- CONNECTION_TIMEOUT =
one minute
60
Instance Attribute Summary collapse
-
#log_messages ⇒ Object
Returns the value of attribute log_messages.
-
#response_queues ⇒ Object
readonly
Returns the value of attribute response_queues.
Instance Method Summary collapse
- #connection_info(connection) ⇒ Object
- #connections ⇒ Object
-
#forward(connection) ⇒ Object
stub for indexing.
-
#initialize ⇒ Forwarder
constructor
A new instance of Forwarder.
Constructor Details
Instance Attribute Details
#log_messages ⇒ Object
Returns the value of attribute log_messages.
6 7 8 |
# File 'lib/metasploit/aggregator/forwarder.rb', line 6 def @log_messages end |
#response_queues ⇒ Object (readonly)
Returns the value of attribute response_queues.
7 8 9 |
# File 'lib/metasploit/aggregator/forwarder.rb', line 7 def response_queues @response_queues end |
Instance Method Details
#connection_info(connection) ⇒ Object
36 37 38 39 40 |
# File 'lib/metasploit/aggregator/forwarder.rb', line 36 def connection_info(connection) info = {} info['TIME'] = @response_queues[connection].time unless @response_queues[connection].nil? info end |
#connections ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/metasploit/aggregator/forwarder.rb', line 21 def connections # TODO: for now before reporting connections flush stale ones flush_stale_sessions connections = {} @response_queues.each_pair do |connection, _queue| forward = 'parked' _send, _recv, console = @router.get_forward(connection) unless console.nil? forward = "#{console}" end connections[connection] = forward end connections end |
#forward(connection) ⇒ Object
stub for indexing
17 18 19 |
# File 'lib/metasploit/aggregator/forwarder.rb', line 17 def forward(connection) end |