File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
modules/post/windows/recon Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,7 @@ def resolve_hostname(hostname)
50
50
ip = sockaddr [ 4 , 4 ] . unpack ( 'N' ) . first
51
51
hostip = Rex ::Socket . addr_itoa ( ip )
52
52
print_status ( "#{ hostname } resolves to #{ hostip } " )
53
- rescue ::Exception => e
54
- print_error ( e )
53
+ rescue Rex ::Post ::Meterpreter ::RequestError
55
54
print_status ( 'Windows 2000 and prior does not support getaddrinfo' )
56
55
end
57
56
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def resolve_ip(ip)
39
39
memtext = client . railgun . memread ( ptr2dns [ 'return' ] , 255 )
40
40
host_inmem = memtext . split ( ip_ino ) [ 1 ] . split ( "\00 " ) [ 0 ]
41
41
print_good ( "#{ ip } resolves to #{ host_inmem } " )
42
- rescue :: Exception => e
42
+ rescue Rex :: Post :: Meterpreter :: RequestError
43
43
print_error ( "Failed to resolve #{ ip } " )
44
44
end
45
45
end
You can’t perform that action at this time.
0 commit comments