Add support for getting transport timeouts
parent
91202e2447
commit
ec7fab7ef6
|
@ -100,6 +100,18 @@ class ClientCore < Extension
|
||||||
commands
|
commands
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_transport_timeouts
|
||||||
|
request = Packet.create_request('core_transport_get_timeouts')
|
||||||
|
response = client.send_request(request)
|
||||||
|
|
||||||
|
{
|
||||||
|
:session_exp => response.get_tlv_value(TLV_TYPE_TRANS_SESSION_EXP),
|
||||||
|
:comm_timeout => response.get_tlv_value(TLV_TYPE_TRANS_COMM_TIMEOUT),
|
||||||
|
:retry_total => response.get_tlv_value(TLV_TYPE_TRANS_RETRY_TOTAL),
|
||||||
|
:retry_wait => response.get_tlv_value(TLV_TYPE_TRANS_RETRY_WAIT)
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# Loads a library on the remote meterpreter instance. This method
|
# Loads a library on the remote meterpreter instance. This method
|
||||||
# supports loading both extension and non-extension libraries and
|
# supports loading both extension and non-extension libraries and
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- coding: binary -*-
|
# -*- coding: binary -*-
|
||||||
require 'set'
|
require 'set'
|
||||||
|
require 'dotiw'
|
||||||
require 'rex/post/meterpreter'
|
require 'rex/post/meterpreter'
|
||||||
require 'rex/parser/arguments'
|
require 'rex/parser/arguments'
|
||||||
|
|
||||||
|
@ -58,6 +59,7 @@ class Console::CommandDispatcher::Core
|
||||||
"run" => "Executes a meterpreter script or Post module",
|
"run" => "Executes a meterpreter script or Post module",
|
||||||
"bgrun" => "Executes a meterpreter script as a background thread",
|
"bgrun" => "Executes a meterpreter script as a background thread",
|
||||||
"bgkill" => "Kills a background meterpreter script",
|
"bgkill" => "Kills a background meterpreter script",
|
||||||
|
"get_timeouts" => "Kills a background meterpreter script",
|
||||||
"bglist" => "Lists running background scripts",
|
"bglist" => "Lists running background scripts",
|
||||||
"write" => "Writes data to a channel",
|
"write" => "Writes data to a channel",
|
||||||
"enable_unicode_encoding" => "Enables encoding of unicode strings",
|
"enable_unicode_encoding" => "Enables encoding of unicode strings",
|
||||||
|
@ -322,6 +324,14 @@ class Console::CommandDispatcher::Core
|
||||||
Rex::Ui::Text::IrbShell.new(binding).run
|
Rex::Ui::Text::IrbShell.new(binding).run
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def cmd_get_timeouts(*args)
|
||||||
|
timeouts = client.core.get_transport_timeouts
|
||||||
|
print_line("Session Expiry : @ #{(Time.now + timeouts[:session_exp]).strftime('%Y-%m-%d %H:%M:%S')}")
|
||||||
|
print_line("Comm Timeout : #{timeouts[:comm_timeout]} seconds")
|
||||||
|
print_line("Retry Total Time: #{timeouts[:retry_total]} seconds")
|
||||||
|
print_line("Retry Wait Time : #{timeouts[:retry_wait]} seconds")
|
||||||
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get the machine ID of the target
|
# Get the machine ID of the target
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue