Skip to content

Commit d5bb7b1

Browse files
committed
Fix all-inclusive rescue on resolve_hostname as well
1 parent 6a281b2 commit d5bb7b1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/post/windows/recon/resolve_hostname.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ def resolve_hostname(hostname)
5050
ip = sockaddr[4,4].unpack('N').first
5151
hostip = Rex::Socket.addr_itoa(ip)
5252
print_status("#{hostname} resolves to #{hostip}")
53-
rescue ::Exception => e
54-
print_error(e)
53+
rescue Rex::Post::Meterpreter::RequestError
5554
print_status('Windows 2000 and prior does not support getaddrinfo')
5655
end
5756

0 commit comments

Comments
 (0)