Skip to content

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

Check if API key was set

Brendan Coles9c7e63a96640
diff --git a/modules/sfp_hunter.py b/modules/sfp_hunter.py
index 1aa09a91..28cefb71 100644
--- a/modules/sfp_hunter.py
+++ b/modules/sfp_hunter.py
@@ -32,6 +32,7 @@ class sfp_hunter(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
@@ -88,6 +89,11 @@ class sfp_hunter(SpiderFootPlugin):
else:
self.results[eventData] = True
+ if self.opts['api_key'] == "":
+ self.sf.error("You enabled sfp_hunter but did not set an API key!", False)
+ self.errorState = True
+ return None
+
data = self.query(eventData)
if data == None:
return None