Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Handle empty issued return value.

smicallefb7f18c75d01e
diff --git a/modules/sfp_sslcert.py b/modules/sfp_sslcert.py
index 12129946..b6ae01d7 100644
--- a/modules/sfp_sslcert.py
+++ b/modules/sfp_sslcert.py
@@ -219,6 +219,9 @@ class sfp_sslcert(SpiderFootPlugin):
# Extract the CN from the issued section
issued = self.getIssued(cert)
+ if not issued:
+ return False
+
if "cn=" + fqdn in issued.lower():
hosts.append('dns:' + fqdn)
diff --git a/modules/sfp_ssltools.py b/modules/sfp_ssltools.py
index 7a9574ab..732f3987 100644
--- a/modules/sfp_ssltools.py
+++ b/modules/sfp_ssltools.py
@@ -33,12 +33,12 @@ class sfp_ssltools(SpiderFootPlugin):
'certexpiringdays': 'Number of days in the future a certificate expires to consider it as expiring.'
}
- results = dict()
+ results = None
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
self.__dataSource__ = 'SSL Tools'
- self.results = dict()
+ self.results = self.tempStorage()
for opt in userOpts.keys():
self.opts[opt] = userOpts[opt]
@@ -265,6 +265,9 @@ class sfp_ssltools(SpiderFootPlugin):
# Extract the CN from the issued section
issued = self.getIssued(cert)
+ if not issued:
+ return False
+
if "cn=" + fqdn in issued.lower():
hosts.append('dns:' + fqdn)