Class: Rex::Post::Meterpreter::Extensions::Unhook::Unhook
- Inherits:
-
Rex::Post::Meterpreter::Extension
- Object
- Rex::Post::Meterpreter::Extension
- Rex::Post::Meterpreter::Extensions::Unhook::Unhook
- Defined in:
- lib/rex/post/meterpreter/extensions/unhook/unhook.rb
Overview
This meterpreter extension can be used to unhook PSP products
Constant Summary collapse
- UNHOOK_ERROR_SUCCESS =
0
Instance Attribute Summary
Attributes inherited from Rex::Post::Meterpreter::Extension
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(client) ⇒ Unhook
constructor
A new instance of Unhook.
- #unhook_pe ⇒ Object
Constructor Details
#initialize(client) ⇒ Unhook
Returns a new instance of Unhook.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rex/post/meterpreter/extensions/unhook/unhook.rb', line 25 def initialize(client) super(client, 'unhook') client.register_extension_aliases( [ { 'name' => 'unhook', 'ext' => self }, ]) end |
Class Method Details
.extension_id ⇒ Object
21 22 23 |
# File 'lib/rex/post/meterpreter/extensions/unhook/unhook.rb', line 21 def self.extension_id EXTENSION_ID_UNHOOK end |
Instance Method Details
#unhook_pe ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/rex/post/meterpreter/extensions/unhook/unhook.rb', line 37 def unhook_pe request = Packet.create_request(COMMAND_ID_UNHOOK_PE) response = client.send_request(request) response_code = response.get_tlv_value(TLV_TYPE_UNHOOK_ERROR_CODE) raise Exception, 'Did not get ERROR_SUCCESS back!' if response_code != UNHOOK_ERROR_SUCCESS return 0, response_code, nil end |