Skip to content

Commit 8806e76

Browse files
committed
Fix undefined method error
[FixRM rapid7#8343]
1 parent 37eaa62 commit 8806e76

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/auxiliary/gather/external_ip.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ def initialize
4242
def run
4343
connect
4444
res = send_request_cgi({'uri' => '/ip', 'method' => 'GET' })
45+
46+
if res.nil?
47+
print_error("Connection timed out")
48+
return
49+
end
50+
4551
our_addr = res.body.strip
4652
if Rex::Socket.is_ipv4?(our_addr) or Rex::Socket.is_ipv6?(our_addr)
4753
print_good("Source ip to #{rhost} is #{our_addr}")

0 commit comments

Comments
 (0)