Land #10584, fix session upgrade HANDLE_TIMEOUT and upgrading osx shells

GSoC/Meterpreter_Web_Console
Brent Cook 2018-09-06 05:52:40 -05:00
commit dd476066cf
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
2 changed files with 10 additions and 2 deletions

View File

@ -69,6 +69,13 @@ class CommandShell
"Command shell"
end
#
# Calls the class method
#
def type
self.class.type
end
##
# :category: Msf::Session::Provider::SingleCommandShell implementors
#

View File

@ -265,8 +265,9 @@ class MetasploitModule < Msf::Post
framework.threads.spawn('ShellToMeterpreterUpgradeCleanup', false) {
if !aborted
timer = 0
vprint_status("Waiting up to #{HANDLE_TIMEOUT} seconds for the session to come back")
while !framework.jobs[listener_job_id].nil? && timer < HANDLE_TIMEOUT
timeout = datastore['HANDLE_TIMEOUT']
vprint_status("Waiting up to #{timeout} seconds for the session to come back")
while !framework.jobs[listener_job_id].nil? && timer < timeout
sleep(1)
timer += 1
end