Skip to content

Commit

Permalink
Fix #513: return empty list instead of an object containing N/A
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Jul 12, 2019
1 parent 601ef08 commit 83fe8fa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion analyzers/PassiveTotal/passivetotal_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ def run(self):
elif self.service == 'ssl_certificate_history':
ssl_request = SslRequest(username=self.username, api_key=self.api_key)
result = ssl_request.get_ssl_certificate_history(query=data)
self.report(result)
print(len(result['results']))
if len(result['results']) == 1 and result['results'][0]['ipAddresses'] == 'N/A':
print("ok")
self.report({'results': []})
else:
self.report(result)

# unique resolutions service
elif self.service == 'unique_resolutions':
Expand Down

0 comments on commit 83fe8fa

Please sign in to comment.