Skip to content

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

Fix sfp_sslcert handling of IP_ADDRESS events

Brendan Colese4de14616543
diff --git a/modules/sfp_sslcert.py b/modules/sfp_sslcert.py
index d813a0c0..5c317c2e 100644
--- a/modules/sfp_sslcert.py
+++ b/modules/sfp_sslcert.py
@@ -73,6 +73,9 @@ class sfp_sslcert(SpiderFootPlugin):
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
if eventName == "LINKED_URL_INTERNAL":
+ if not eventData.lower().startswith("https://") and not self.opts['tryhttp']:
+ return None
+
fqdn = self.sf.urlFQDN(eventData.lower())
else:
fqdn = eventData
@@ -82,12 +85,6 @@ class sfp_sslcert(SpiderFootPlugin):
else:
return None
- if eventName == "IP_ADDRESS":
- fqdn = "https://" + eventData
-
- if not eventData.lower().startswith("https://") and not self.opts['tryhttp']:
- return None
-
port = 443
self.sf.debug("Testing SSL for: " + eventData + ':' + str(port))
# Re-fetch the certificate from the site and process