Skip to content

Commit

Permalink
continue after http connection errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hannob committed Jul 29, 2024
1 parent 8db86be commit f396d87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion keyfinder
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ if __name__ == "__main__":
host = urllib.parse.urlparse(url).netloc
today = datetime.datetime.now(tz=datetime.timezone.utc).date().isoformat()
meta = f"url: {url}\ndate: {today}\n\n"
r = requests.get(url, timeout=60, verify=False)
try:
r = requests.get(url, timeout=60, verify=False)
except requests.exceptions.ConnectionError:
print(f"Connection error with {url}")
continue
keys = findkeys(r.content)
for k in keys:
writekey(meta + k, host, args.outdir)
Expand Down

0 comments on commit f396d87

Please sign in to comment.