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

4.x 4.17.10
Brent Cook 2018-09-06 05:52:40 -05:00 committed by Metasploit
parent e9a94595c2
commit 1c05bb6ef3
No known key found for this signature in database
GPG Key ID: CDFB5FA52007B954
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