Rescue an IOError on channel double-close.
This was causing output from python meterpreter commands run on OSX to be discarded when the error was raised, making cmd_exec not-so-useful.bug/bundler_fix
parent
0380c5e887
commit
b1b8cba4c5
|
@ -111,7 +111,13 @@ module Msf::Post::Common
|
|||
o << d
|
||||
end
|
||||
o.chomp! if o
|
||||
process.channel.close
|
||||
|
||||
begin
|
||||
process.channel.close
|
||||
rescue IOError => e
|
||||
# Channel was already closed, but we got the cmd output, so let's soldier on.
|
||||
end
|
||||
|
||||
process.close
|
||||
when /shell/
|
||||
o = session.shell_command_token("#{cmd} #{args}", time_out)
|
||||
|
|
Loading…
Reference in New Issue