Rescue rescue Rex::TimeoutError so the iteration can keep going

bug/bundler_fix
sinn3r 2014-12-20 01:12:30 -06:00
parent a8e3ee033c
commit ad8bbf4477
1 changed files with 6 additions and 4 deletions

View File

@ -1705,12 +1705,14 @@ class Core
'Channelized' => true,
'Hidden' => true
})
if process && process.channel
data = process.channel.read
print_line(data) if data
end
rescue ::Rex::Post::Meterpreter::RequestError
print_error("Failed: #{$!.class} #{$!}")
end
if process && process.channel
data = process.channel.read
print_line(data) if data
rescue Rex::TimeoutError
print_error("Operation timed out")
end
elsif session.type == 'shell'
output = session.shell_command(cmd)