Skip to content

Commit

Permalink
Merge pull request #29 from internetwache/fix_28
Browse files Browse the repository at this point in the history
Try to decode header as utf8 and ignore any non-compliant characters …
  • Loading branch information
gehaxelt authored Oct 23, 2019
2 parents d1182f3 + 3bce18f commit 8fcd119
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Finder/gitfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def findgitrepo(output_file, domains):
try:
# Try to download http://target.tld/.git/HEAD
with urlopen(''.join(['http://', domain, '/.git/HEAD']), timeout=5) as response:
answer = response.read(200).decode()
answer = response.read(200).decode('utf-8', 'ignore')

except HTTPError:
return
Expand Down

0 comments on commit 8fcd119

Please sign in to comment.