Land #5600, update session info after migrate

bug/bundler_fix
HD Moore 2015-06-24 15:16:58 -05:00
commit 4d58e49cdc
No known key found for this signature in database
GPG Key ID: 7549FB3DB1DD1F32
2 changed files with 18 additions and 12 deletions

View File

@ -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

View File

@ -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|