Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivukotic committed Sep 18, 2023
1 parent 6073f68 commit c6e7c85
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions siteMapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ def request(url, hostcert=None, hostkey=None, verify=False):


def get_ip(host):

ip4, ip6 = None, None

try:
host_addr = socket.getaddrinfo(host, 80, 0, 0, socket.IPPROTO_TCP)
except socket.gaierror:
print(f'Unable to resolve {host}')
return None, None
ip4, ip6 = None
return ip4, ip6

for family, _, _, _, sockaddr in host_addr:
if family == socket.AF_INET:
Expand Down

0 comments on commit c6e7c85

Please sign in to comment.