Rescue Rex::Proto::SunRPC::RPCTimeout

Coincidentally, this also fixes the rescue in the library, since
rescuing Timeout instead of Timeout::Error does nothing.
MS-2855/keylogger-mettle-extension
William Vu 2018-01-12 16:18:45 -06:00
parent 0c9f1d71d3
commit 2916c5ae45
2 changed files with 3 additions and 4 deletions

View File

@ -179,7 +179,8 @@ class Client
buf = nil
begin
Timeout.timeout(maxwait) { buf = sock.get }
rescue ::Timeout
rescue Timeout::Error
raise RPCTimeout
end
return nil if not buf

View File

@ -78,9 +78,7 @@ class MetasploitModule < Msf::Auxiliary
rescue Rex::Proto::SunRPC::RPCError
print_error('Could not call bootparamd procedure')
return
# XXX: This bubbles up from Rex::Proto::SunRPC::Client
# TODO: Make it raise Rex::Proto::SunRPC::RPCTimeout
rescue Timeout::Error
rescue Rex::Proto::SunRPC::RPCTimeout
print_error('Could not disclose NIS domain name (try another CLIENT?)')
return
ensure