Skip to content

Commit

Permalink
Ignore SSL warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuermel authored Jul 2, 2020
1 parent 762e412 commit 7407cb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Finder/gitfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
from urllib.request import urlopen
from urllib.error import HTTPError, URLError
import sys

import ssl

def findgitrepo(output_file, domains):
domain = domains.strip()

try:
# Try to download http://target.tld/.git/HEAD
with urlopen(''.join(['http://', domain, '/.git/HEAD']), timeout=5) as response:
with urlopen(''.join(['http://', domain, '/.git/HEAD']), context=ssl._create_unverified_context(), timeout=5) as response:
answer = response.read(200).decode('utf-8', 'ignore')

except HTTPError:
Expand Down

0 comments on commit 7407cb4

Please sign in to comment.