SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Longer SSL timeout and better unicode handling.
Steveba0635fd1cee
diff --git a/modules/sfp_sslcert.py b/modules/sfp_sslcert.pyindex 6a210ca6..d5d30416 100644--- a/modules/sfp_sslcert.py+++ b/modules/sfp_sslcert.py@@ -24,7 +24,7 @@ class sfp_sslcert(SpiderFootPlugin):# Default optionsopts = {"tryhttp": True,- "ssltimeout": 5,+ "ssltimeout": 10,"certexpiringdays": 30}@@ -101,7 +101,9 @@ class sfp_sslcert(SpiderFootPlugin):# Generate the event for the raw cert (in text form)# Cert raw data text contains a lot of gems..- rawevt = SpiderFootEvent("SSL_CERTIFICATE_RAW", m2cert.as_text(), self.__name__, event)+ rawevt = SpiderFootEvent("SSL_CERTIFICATE_RAW",+ m2cert.as_text().encode('raw_unicode_escape'),+ self.__name__, event)self.notifyListeners(rawevt)# Generate events for other cert aspects@@ -112,13 +114,13 @@ class sfp_sslcert(SpiderFootPlugin):# Report back who the certificate was issued todef getIssued(self, cert, sevt):- issued = cert.get_subject().as_text()+ issued = cert.get_subject().as_text().encode('raw_unicode_escape')evt = SpiderFootEvent("SSL_CERTIFICATE_ISSUED", issued, self.__name__, sevt)self.notifyListeners(evt)# Report back the certificate issuerdef getIssuer(self, cert, sevt):- issuer = cert.get_issuer().as_text()+ issuer = cert.get_issuer().as_text().encode('raw_unicode_escape')evt = SpiderFootEvent("SSL_CERTIFICATE_ISSUER", issuer, self.__name__, sevt)self.notifyListeners(evt)@@ -128,13 +130,13 @@ class sfp_sslcert(SpiderFootPlugin):hosts = ""# Extract the CN from the issued section- issued = cert.get_subject().as_text()+ issued = cert.get_subject().as_text().encode('raw_unicode_escape')self.sf.debug("Checking for " + fqdn + " in " + issued.lower())if "cn=" + fqdn in issued.lower():hosts = 'dns:' + fqdntry:- hosts = hosts + " " + cert.get_ext("subjectAltName").get_value().lower()+ hosts = hosts + " " + cert.get_ext("subjectAltName").get_value().encode('raw_unicode_escape').lower()except LookupError as e:self.sf.debug("No alternative name found in certificate.")