Land #5600, update session info after migrate
commit
4d58e49cdc
|
@ -319,15 +319,7 @@ class Meterpreter < Rex::Post::Meterpreter::Client
|
|||
false
|
||||
end
|
||||
|
||||
#
|
||||
# Populate the session information.
|
||||
#
|
||||
# Also reports a session_fingerprint note for host os normalization.
|
||||
#
|
||||
def load_session_info()
|
||||
begin
|
||||
::Timeout.timeout(60) do
|
||||
# Gather username/system information
|
||||
def update_session_info
|
||||
username = self.sys.config.getuid
|
||||
sysinfo = self.sys.config.sysinfo
|
||||
|
||||
|
@ -338,6 +330,17 @@ class Meterpreter < Rex::Post::Meterpreter::Client
|
|||
# showing up in various places in the UI.
|
||||
safe_info.gsub!(/[\x00-\x08\x0b\x0c\x0e-\x19\x7f-\xff]+/n,"_")
|
||||
self.info = safe_info
|
||||
end
|
||||
|
||||
#
|
||||
# Populate the session information.
|
||||
#
|
||||
# Also reports a session_fingerprint note for host os normalization.
|
||||
#
|
||||
def load_session_info
|
||||
begin
|
||||
::Timeout.timeout(60) do
|
||||
update_session_info
|
||||
|
||||
hobj = nil
|
||||
|
||||
|
|
|
@ -835,6 +835,9 @@ class Console::CommandDispatcher::Core
|
|||
|
||||
print_status("Migration completed successfully.")
|
||||
|
||||
# Update session info (we may have a new username)
|
||||
client.update_session_info
|
||||
|
||||
unless existing_relays.empty?
|
||||
print_status("Recreating TCP relay(s)...")
|
||||
existing_relays.each do |r|
|
||||
|
|
Loading…
Reference in New Issue