Skip to content

Commit

Permalink
Fixes #229: Added error msg for hashes with len != 40
Browse files Browse the repository at this point in the history
  • Loading branch information
3c7 committed Apr 13, 2018
1 parent 298bf48 commit 1c74ce8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions analyzers/CIRCLPassiveSSL/circl_passivessl.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ def summary(self, raw):

def run(self):
if self.data_type == 'certificate_hash' or self.data_type == 'hash':
data = self.get_data()
if len(data) != 40:
self.error('CIRCL Passive SSL expects a sha1 hash, given hash has more or less than 40 characters.')
self.report(self.query_certificate(self.get_data()))
elif self.data_type == 'ip':
ip = self.get_data()
Expand Down

0 comments on commit 1c74ce8

Please sign in to comment.