Skip to content

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

API keys more easily recognisable.

Steve608aaa55cf58
diff --git a/modules/sfp_alienvault.py b/modules/sfp_alienvault.py
index db74f1ef..57a62610 100644
--- a/modules/sfp_alienvault.py
+++ b/modules/sfp_alienvault.py
@@ -22,14 +22,14 @@ class sfp_alienvault(SpiderFootPlugin):
# Default options
opts = {
- "apikey": "",
+ "api_key": "",
"age_limit_days": 30,
"threat_score_min": 2
}
# Option descriptions
optdescs = {
- "apikey": "Your AlienVault OTX API Key",
+ "api_key": "Your AlienVault OTX API Key",
"age_limit_days": "Ignore any records older than this many days. 0 = unlimited.",
"threat_score_min": "Minimum AlienVault threat score."
}
@@ -80,7 +80,7 @@ class sfp_alienvault(SpiderFootPlugin):
"/" + qry + "/" + querytype
headers = {
'Accept': 'application/json',
- 'X-OTX-API-KEY': self.opts['apikey']
+ 'X-OTX-API-KEY': self.opts['api_key']
}
res = self.sf.fetchUrl(url, timeout=self.opts['_fetchtimeout'],
useragent="SpiderFoot", headers=headers)
@@ -114,7 +114,7 @@ class sfp_alienvault(SpiderFootPlugin):
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
- if self.opts['apikey'] == "":
+ if self.opts['api_key'] == "":
self.sf.error("You enabled sfp_alienvault but did not set an API key/password!", False)
self.errorState = True
return None
diff --git a/modules/sfp_botscout.py b/modules/sfp_botscout.py
index 8342a36e..73d55e1d 100644
--- a/modules/sfp_botscout.py
+++ b/modules/sfp_botscout.py
@@ -20,10 +20,10 @@ class sfp_botscout(SpiderFootPlugin):
# Default options
opts = {
- "apikey": ""
+ "api_key": ""
}
optdescs = {
- "apikey": "botscout.com API key. Without this you will be limited to 50 look-ups per day."
+ "api_key": "botscout.com API key. Without this you will be limited to 50 look-ups per day."
}
results = dict()
errorState = False
@@ -56,7 +56,7 @@ class sfp_botscout(SpiderFootPlugin):
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
- if self.opts['apikey'] == "":
+ if self.opts['api_key'] == "":
self.sf.error("You enabled sfp_botscout but did not set an API key!", False)
self.errorState = True
return None
@@ -68,8 +68,8 @@ class sfp_botscout(SpiderFootPlugin):
else:
self.results[eventData] = True
- if self.opts['apikey']:
- url = "http://botscout.com/test/?key=" + self.opts['apikey'] + "&all="
+ if self.opts['api_key']:
+ url = "http://botscout.com/test/?key=" + self.opts['api_key'] + "&all="
else:
url = "http://botscout.com/test/?all="
diff --git a/modules/sfp_censys.py b/modules/sfp_censys.py
index 8196fdee..06f39f4f 100644
--- a/modules/sfp_censys.py
+++ b/modules/sfp_censys.py
@@ -22,15 +22,15 @@ class sfp_censys(SpiderFootPlugin):
# Default options
opts = {
- "censys_api_uid": "",
- "censys_api_secret": "",
+ "censys_api_key_uid": "",
+ "censys_api_key_secret": "",
"age_limit_days": 90
}
# Option descriptions
optdescs = {
- "censys_api_uid": "Your Censys.io API UID",
- "censys_api_secret": "Your Censys.io API Secret",
+ "censys_api_key_uid": "Your Censys.io API UID",
+ "censys_api_key_secret": "Your Censys.io API Secret",
"age_limit_days": "Ignore any records older than this many days. 0 = unlimited."
}
@@ -69,7 +69,7 @@ class sfp_censys(SpiderFootPlugin):
censys_url = "https://censys.io/api/v1/view"
headers = {
- 'Authorization': "Basic " + base64.b64encode(self.opts['censys_api_uid'] + ":" + self.opts['censys_api_secret'])
+ 'Authorization': "Basic " + base64.b64encode(self.opts['censys_api_key_uid'] + ":" + self.opts['censys_api_key_secret'])
}
url = censys_url + "/" + querytype.format(qry)
res = self.sf.fetchUrl(url , timeout=self.opts['_fetchtimeout'],
@@ -105,7 +105,7 @@ class sfp_censys(SpiderFootPlugin):
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
- if self.opts['censys_api_uid'] == "" or self.opts['censys_api_secret'] == "":
+ if self.opts['censys_api_key_uid'] == "" or self.opts['censys_api_key_secret'] == "":
self.sf.error("You enabled sfp_censys but did not set an API uid/secret!", False)
self.errorState = True
return None
diff --git a/modules/sfp_clearbit.py b/modules/sfp_clearbit.py
index dc36e284..0f4dfe26 100644
--- a/modules/sfp_clearbit.py
+++ b/modules/sfp_clearbit.py
@@ -18,12 +18,12 @@ class sfp_clearbit(SpiderFootPlugin):
# Default options
opts = {
- "apikey": ""
+ "api_key": ""
}
# Option descriptions
optdescs = {
- "apikey": "Your API key from clearbit.com."
+ "api_key": "Your API key from clearbit.com."
}
# Be sure to completely clear any class variables in setup()
@@ -56,7 +56,7 @@ class sfp_clearbit(SpiderFootPlugin):
url = "https://person.clearbit.com/v2/combined/find?email=" + t
headers = {
'Accept': 'application/json',
- 'Authorization': "Basic " + base64.b64encode(self.opts['apikey'] + ":")
+ 'Authorization': "Basic " + base64.b64encode(self.opts['api_key'] + ":")
}
res = self.sf.fetchUrl(url, timeout=self.opts['_fetchtimeout'],
useragent="SpiderFoot", headers=headers)
diff --git a/modules/sfp_honeypot.py b/modules/sfp_honeypot.py
index 5c95ecc5..074d7ac4 100644
--- a/modules/sfp_honeypot.py
+++ b/modules/sfp_honeypot.py
@@ -21,7 +21,7 @@ class sfp_honeypot(SpiderFootPlugin):
# Default options
opts = {
- 'apikey': "",
+ 'api_key': "",
'searchengine': False,
'threatscore': 0,
'timelimit': 30,
@@ -33,7 +33,7 @@ class sfp_honeypot(SpiderFootPlugin):
# Option descriptions
optdescs = {
- 'apikey': "The API key you obtained from projecthoneypot.org",
+ 'api_key': "The API key you obtained from projecthoneypot.org",
'searchengine': "Include entries considered search engines?",
'threatscore': "Threat score minimum, 0 being everything and 255 being only the most serious.",
'timelimit': "Maximum days old an entry can be. 255 is the maximum, 0 means you'll get nothing.",
@@ -106,7 +106,7 @@ class sfp_honeypot(SpiderFootPlugin):
eventName = parentEvent.eventType
try:
- lookup = self.opts['apikey'] + "." + \
+ lookup = self.opts['api_key'] + "." + \
self.reverseAddr(qaddr) + ".dnsbl.httpbl.org"
self.sf.debug("Checking Honeypot: " + lookup)
@@ -151,7 +151,7 @@ class sfp_honeypot(SpiderFootPlugin):
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
- if self.opts['apikey'] == "":
+ if self.opts['api_key'] == "":
self.sf.error("You enabled sfp_honeypot but did not set an API key!", False)
self.errorState = True
return None
diff --git a/modules/sfp_hunter.py b/modules/sfp_hunter.py
index efe01a26..784a9755 100644
--- a/modules/sfp_hunter.py
+++ b/modules/sfp_hunter.py
@@ -19,12 +19,12 @@ class sfp_hunter(SpiderFootPlugin):
# Default options
opts = {
- "apikey": ""
+ "api_key": ""
}
# Option descriptions
optdescs = {
- "apikey": "Your API key from hunter.io."
+ "api_key": "Your API key from hunter.io."
}
# Be sure to completely clear any class variables in setup()
@@ -53,7 +53,7 @@ class sfp_hunter(SpiderFootPlugin):
def query(self, t):
ret = None
- url = "https://api.hunter.io/v2/domain-search?domain=" + t + "&api_key=" + self.opts['apikey']
+ url = "https://api.hunter.io/v2/domain-search?domain=" + t + "&api_key=" + self.opts['api_key']
res = self.sf.fetchUrl(url, timeout=self.opts['_fetchtimeout'],
useragent="SpiderFoot")
diff --git a/modules/sfp_malwarepatrol.py b/modules/sfp_malwarepatrol.py
index 889a3b5d..16d75615 100644
--- a/modules/sfp_malwarepatrol.py
+++ b/modules/sfp_malwarepatrol.py
@@ -20,10 +20,10 @@ class sfp_malwarepatrol(SpiderFootPlugin):
# Default options
opts = {
- "apikey": ""
+ "api_key": ""
}
optdescs = {
- "apikey": "malwarepatrol.com 'receipt' ID, provided once signing up for their open-source feed. Without this you cannot obtain their feed."
+ "api_key": "malwarepatrol.com 'receipt' ID, provided once signing up for their open-source feed. Without this you cannot obtain their feed."
}
results = dict()
errorState = False
@@ -52,7 +52,7 @@ class sfp_malwarepatrol(SpiderFootPlugin):
def queryAddr(self, qaddr):
data = dict()
url = "http://lists.malwarepatrol.net/cgi/getfile?receipt=" + \
- self.opts['apikey'] + "&product=8&list=smoothwall"
+ self.opts['api_key'] + "&product=8&list=smoothwall"
data['content'] = self.sf.cacheGet("sfmalwarepatrol", 72)
if data['content'] is None:
@@ -83,7 +83,7 @@ class sfp_malwarepatrol(SpiderFootPlugin):
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
- if not self.opts['apikey']:
+ if not self.opts['api_key']:
self.sf.error("You enabled sfp_malwarepatrol but did not provide an receipt ID!", False)
self.errorState = True
return None
diff --git a/modules/sfp_shodan.py b/modules/sfp_shodan.py
index e1e115d1..b2c36491 100644
--- a/modules/sfp_shodan.py
+++ b/modules/sfp_shodan.py
@@ -20,14 +20,14 @@ class sfp_shodan(SpiderFootPlugin):
# Default options
opts = {
- "apikey": "",
+ "api_key": "",
'netblocklookup': True,
'maxnetblock': 24
}
# Option descriptions
optdescs = {
- "apikey": "Your SHODAN API Key.",
+ "api_key": "Your SHODAN API Key.",
'netblocklookup': "Look up all IPs on netblocks deemed to be owned by your target for possible hosts on the same target subdomain/domain?",
'maxnetblock': "If looking up owned netblocks, the maximum netblock size to look up all IPs within (CIDR value, 24 = /24, 16 = /16, etc.)"
}
@@ -56,7 +56,7 @@ class sfp_shodan(SpiderFootPlugin):
def query(self, qry):
res = self.sf.fetchUrl("https://api.shodan.io/shodan/host/" + qry +
- "?key=" + self.opts['apikey'],
+ "?key=" + self.opts['api_key'],
timeout=self.opts['_fetchtimeout'], useragent="SpiderFoot")
if res['content'] is None:
self.sf.info("No SHODAN info found for " + qry)
@@ -81,7 +81,7 @@ class sfp_shodan(SpiderFootPlugin):
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
- if self.opts['apikey'] == "":
+ if self.opts['api_key'] == "":
self.sf.error("You enabled sfp_shodan but did not set an API key!", False)
self.errorState = True
return None
diff --git a/modules/sfp_virustotal.py b/modules/sfp_virustotal.py
index b51a226d..25076514 100644
--- a/modules/sfp_virustotal.py
+++ b/modules/sfp_virustotal.py
@@ -21,7 +21,7 @@ class sfp_virustotal(SpiderFootPlugin):
# Default options
opts = {
- "apikey": "",
+ "api_key": "",
"publicapi": True,
"checkcohosts": True,
"checkaffiliates": True,
@@ -33,7 +33,7 @@ class sfp_virustotal(SpiderFootPlugin):
# Option descriptions
optdescs = {
- "apikey": "Your VirusTotal API Key.",
+ "api_key": "Your VirusTotal API Key.",
"publicapi": "Are you using a public key? If so SpiderFoot will pause for 15 seconds after each query to avoid VirusTotal dropping requests.",
"checkcohosts": "Check co-hosted sites?",
"checkaffiliates": "Check affiliates?",
@@ -80,7 +80,7 @@ class sfp_virustotal(SpiderFootPlugin):
else:
url = "https://www.virustotal.com/vtapi/v2/domain/report?domain=" + qry
- res = self.sf.fetchUrl(url + "&apikey=" + self.opts['apikey'],
+ res = self.sf.fetchUrl(url + "&apikey=" + self.opts['api_key'],
timeout=self.opts['_fetchtimeout'], useragent="SpiderFoot")
# Public API is limited to 4 queries per minute
@@ -110,7 +110,7 @@ class sfp_virustotal(SpiderFootPlugin):
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
- if self.opts['apikey'] == "":
+ if self.opts['api_key'] == "":
self.sf.error("You enabled sfp_virustotal but did not set an API key!", False)
self.errorState = True
return None
diff --git a/modules/sfp_xforce.py b/modules/sfp_xforce.py
index 2098628e..2b52e064 100644
--- a/modules/sfp_xforce.py
+++ b/modules/sfp_xforce.py
@@ -24,14 +24,14 @@ class sfp_xforce(SpiderFootPlugin):
# Default options
opts = {
"xforce_api_key": "",
- "xforce_password": "",
+ "xforce_api_key_password": "",
"age_limit_days": 30
}
# Option descriptions
optdescs = {
"xforce_api_key": "The X-Force Exchange API Key",
- "xforce_password": "The X-Force Exchange API Password",
+ "xforce_api_key_password": "The X-Force Exchange API Password",
"age_limit_days": "Ignore any records older than this many days. 0 = unlimited."
}
@@ -73,7 +73,7 @@ class sfp_xforce(SpiderFootPlugin):
xforce_url = "https://api.xforce.ibmcloud.com"
headers = {
'Accept': 'application/json',
- 'Authorization': "Basic " + base64.b64encode(self.opts['xforce_api_key'] + ":" + self.opts['xforce_password'])
+ 'Authorization': "Basic " + base64.b64encode(self.opts['xforce_api_key'] + ":" + self.opts['xforce_api_key_password'])
}
url = xforce_url + "/" + querytype + "/" + qry
res = self.sf.fetchUrl(url , timeout=self.opts['_fetchtimeout'], useragent="SpiderFoot", headers=headers)
@@ -109,7 +109,7 @@ class sfp_xforce(SpiderFootPlugin):
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
- if self.opts['xforce_api_key'] == "" or self.opts['xforce_password'] == "":
+ if self.opts['xforce_api_key'] == "" or self.opts['xforce_api_key_password'] == "":
self.sf.error("You enabled sfp_xforce but did not set an API key/password!", False)
self.errorState = True
return None