Skip to content

Commit

Permalink
#805 #806 add extra info in desciption and tags of extracted observables
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Oct 19, 2020
1 parent 015db22 commit bc35ffa
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions analyzers/CIRCLPassiveSSL/circl_passivessl.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,25 @@ def artifacts(self, raw):
artifacts = []
if 'certificates' in raw:
for c in raw.get('certificates'):
tags = []
tags.append("Certificate:{}".format(
[a
for a in c.get('subject').split(', ')
if a.startswith('O=')][0]
)
)
tags.append("Certificate:{}".format(
[a
for a in c.get('subject').split(', ')
if a.startswith('CN=')][0]
)
)
artifacts.append(
self.build_artifact(
'hash',
str(c.get('fingerprint'))
str(c.get('fingerprint')),
message=str(c.get('subject')),
tags=tags
)
)

Expand All @@ -108,7 +123,6 @@ def artifacts(self, raw):
'ip',
str(ip)
)

)
return artifacts

Expand Down

0 comments on commit bc35ffa

Please sign in to comment.