Skip to content

Commit

Permalink
dnsresolv: Don't crash on OSError
Browse files Browse the repository at this point in the history
  • Loading branch information
irl committed Jan 15, 2018
1 parent 38449ab commit cdf3353
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pathspider/plugins/dnsresolv.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def resolv_host(self, job, config): # pylint: disable=unused-argument
ips = set([str(i[4][0]) for i in socket.getaddrinfo(job['domain'], 80)])
except socket.gaierror:
return {'spdr_state': CONN_DISCARD} # Always discard
except OSError:
return {'spdr_state': CONN_DISCARD} # Always discard
for ip in ips:
res = job.copy()
res['dip'] = ip
Expand Down

0 comments on commit cdf3353

Please sign in to comment.