Skip to content

Commit a3c86f3

Browse files
committed
Merge branch 'dns_postmods' of git://github.com/mubix/metasploit-framework into mubix-dns_postmods
2 parents e6df113 + d5bb7b1 commit a3c86f3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
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

modules/post/windows/recon/resolve_ip.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def resolve_ip(ip)
3939
memtext = client.railgun.memread(ptr2dns['return'],255)
4040
host_inmem = memtext.split(ip_ino)[1].split("\00")[0]
4141
print_good("#{ip} resolves to #{host_inmem}")
42-
rescue ::Exception => e
42+
rescue Rex::Post::Meterpreter::RequestError
4343
print_error("Failed to resolve #{ip}")
4444
end
4545
end

0 commit comments

Comments
 (0)