Skip to content

Commit

Permalink
Change hostname check
Browse files Browse the repository at this point in the history
  • Loading branch information
th-certbund committed Aug 9, 2018
1 parent a31e900 commit 415f136
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions intelmq/bots/parsers/shadowserver/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,12 @@ def convert_http_host_and_url(value, row):
Sinkhole-HTTP-Drone: http_host, url
With some reports, url/http_url holds only the path, with others the full HTTP request.
"""
hostname = ""
if "cc_dns" in row:
if row['cc_dns']:
hostname = row['cc_dns']
hostname = row.get('cc_dns', '')
elif "http_host" in row:
if row['http_host']:
hostname = row['http_host']
hostname = row.get('http_host', '')
else:
hostname = ''

if "url" in row:
path = row.get('url', '')
Expand Down

0 comments on commit 415f136

Please sign in to comment.