Skip to content

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

Check if API key was set

Brendan Coles16e609f5333e
diff --git a/modules/sfp_builtwith.py b/modules/sfp_builtwith.py
index ebaf0abb..2571041d 100644
--- a/modules/sfp_builtwith.py
+++ b/modules/sfp_builtwith.py
@@ -34,6 +34,7 @@ class sfp_builtwith(SpiderFootPlugin):
# or you run the risk of data persisting between scan runs.
results = dict()
+ errorState = False
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
@@ -84,6 +85,11 @@ class sfp_builtwith(SpiderFootPlugin):
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
+ if self.opts['api_key'] == "":
+ self.sf.error("You enabled sfp_builtwith but did not set an API key!", False)
+ self.errorState = True
+ return None
+
# Don't look up stuff twice
if self.results.has_key(eventData):
self.sf.debug("Skipping " + eventData + " as already mapped.")