Module: Rex::Post::Meterpreter::PivotContainer
- Included in:
- Client
- Defined in:
- lib/rex/post/meterpreter/pivot_container.rb
Overview
This interface is meant to be included by things that are meant to contain zero or more pivot instances in the form of a hash.
Instance Attribute Summary collapse
-
#pivot_listeners ⇒ Object
Returns the value of attribute pivot_listeners.
-
#pivot_sessions ⇒ Object
The hash of pivot sessions.
Instance Method Summary collapse
- #add_pivot_listener(listener) ⇒ Object
-
#add_pivot_session(pivot) ⇒ Object
Adds a pivot to the container that is indexed by the pivoted session guid.
- #find_pivot_listener(listener_id) ⇒ Object
-
#find_pivot_session(pivot_session_guid) ⇒ Object
Looks up a pivot instance based on its pivoted session guid.
-
#initialize_pivots ⇒ Object
Initializes the pivot association hash.
- #remove_pivot_listener(listener_id) ⇒ Object
-
#remove_pivot_session(pivot_session_guid) ⇒ Object
Removes a pivot based on its pivoted session guid.
Instance Attribute Details
#pivot_listeners ⇒ Object
Returns the value of attribute pivot_listeners.
62 63 64 |
# File 'lib/rex/post/meterpreter/pivot_container.rb', line 62 def pivot_listeners @pivot_listeners end |
#pivot_sessions ⇒ Object
The hash of pivot sessions.
60 61 62 |
# File 'lib/rex/post/meterpreter/pivot_container.rb', line 60 def pivot_sessions @pivot_sessions end |
Instance Method Details
#add_pivot_listener(listener) ⇒ Object
31 32 33 |
# File 'lib/rex/post/meterpreter/pivot_container.rb', line 31 def add_pivot_listener(listener) self.pivot_listeners[listener.id] = listener end |
#add_pivot_session(pivot) ⇒ Object
Adds a pivot to the container that is indexed by the pivoted session guid.
27 28 29 |
# File 'lib/rex/post/meterpreter/pivot_container.rb', line 27 def add_pivot_session(pivot) self.pivot_sessions[pivot.pivoted_session.session_guid] = pivot end |
#find_pivot_listener(listener_id) ⇒ Object
42 43 44 |
# File 'lib/rex/post/meterpreter/pivot_container.rb', line 42 def find_pivot_listener(listener_id) return self.pivot_listeners[listener_id] end |
#find_pivot_session(pivot_session_guid) ⇒ Object
Looks up a pivot instance based on its pivoted session guid.
38 39 40 |
# File 'lib/rex/post/meterpreter/pivot_container.rb', line 38 def find_pivot_session(pivot_session_guid) return self.pivot_sessions[pivot_session_guid] end |
#initialize_pivots ⇒ Object
Initializes the pivot association hash
18 19 20 21 |
# File 'lib/rex/post/meterpreter/pivot_container.rb', line 18 def initialize_pivots self.pivot_sessions = {} self.pivot_listeners = {} end |
#remove_pivot_listener(listener_id) ⇒ Object
53 54 55 |
# File 'lib/rex/post/meterpreter/pivot_container.rb', line 53 def remove_pivot_listener(listener_id) return self.pivot_listeners.delete(listener_id) end |
#remove_pivot_session(pivot_session_guid) ⇒ Object
Removes a pivot based on its pivoted session guid.
49 50 51 |
# File 'lib/rex/post/meterpreter/pivot_container.rb', line 49 def remove_pivot_session(pivot_session_guid) return self.pivot_sessions.delete(pivot_session_guid) end |