Skip to content

Commit

Permalink
last update to crt.sh - added manual artifact parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
kx499 committed Feb 22, 2019
1 parent 7b69cfb commit 7432eac
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions analyzers/Crtsh/crtshquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,19 @@ def summary(self, raw):

return {"taxonomies": taxonomies}

def artifacts(self, raw):
artifacts = []
results = raw.get('certobj', {}).get('result', [])
for cert in results:
if 'sha1' in cert:
artifacts.append({'type':'certificate_hash', 'value':cert.get('sha1')})
if 'name_value' in cert:
artifacts.append({'type': 'fqdn', 'value': cert.get('name_value')})

#dedup
artifacts = [dict(t) for t in {tuple(d.items()) for d in artifacts}]
return artifacts

def run(self):
Analyzer.run(self)

Expand Down

0 comments on commit 7432eac

Please sign in to comment.