Keep reading external messages on stderr eof

MS-2855/keylogger-mettle-extension
Adam Cammack 2018-01-23 10:46:06 -06:00
parent be08af5404
commit d08510596f
No known key found for this signature in database
GPG Key ID: C9378BA088092D66
1 changed files with 3 additions and 2 deletions

View File

@ -131,8 +131,9 @@ class Msf::Modules::External::Bridge
raise EOFError.new
else
fds = res[0]
# Preferentially drain and log stderr
if fds.include? err
# Preferentially drain and log stderr, EOF counts as activity, but
# stdout might have some buffered data left, so carry on
if fds.include?(err) && !err.eof?
errbuf = err.readpartial(4096)
elog "Unexpected output running #{self.path}:\n#{errbuf}"
end