Skip to content

Commit

Permalink
Fixes #362: empty result set in cert.at pdns analyzer and correct pat…
Browse files Browse the repository at this point in the history
…h for whois.sh
  • Loading branch information
3c7 committed Oct 22, 2018
1 parent 8392531 commit 2352b81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion analyzers/CERTatPassiveDNS/whois_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
import os
from subprocess import check_output


Expand All @@ -13,7 +14,7 @@ def __query(domain, limit=100):
:returns: str -- Console output from whois call.
:rtype: str
"""
s = check_output(['./whois.sh', '--limit {} {}'.format(limit, domain)], universal_newlines=True)
s = check_output(['{}/whois.sh'.format(os.getcwd()), '--limit {} {}'.format(limit, domain)], universal_newlines=True)
return s


Expand All @@ -25,6 +26,9 @@ def __process_results(results):
:returns: python list of dictionaries containing the relevant results.
:rtype: list
"""
if 'no match' in results and 'returning 0 elements' in results:
return []

result_list = []

# Splts the result and cuts first and last dataset which are comments
Expand Down

0 comments on commit 2352b81

Please sign in to comment.