Skip to content

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

Fix-ups.

smicallef2b55793ef0da
diff --git a/modules/sfp_azureblobstorage.py b/modules/sfp_azureblobstorage.py
index c7913985..427696f7 100644
--- a/modules/sfp_azureblobstorage.py
+++ b/modules/sfp_azureblobstorage.py
@@ -35,8 +35,8 @@ class sfp_azureblobstorage(SpiderFootPlugin):
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
- self.s3results = dict()
- self.results = dict()
+ self.s3results = self.tempStorage()
+ self.results = self.tempStorage()
self.lock = threading.Lock()
for opt in userOpts.keys():
diff --git a/modules/sfp_callername.py b/modules/sfp_callername.py
index 8d89e7a7..c124ca16 100644
--- a/modules/sfp_callername.py
+++ b/modules/sfp_callername.py
@@ -89,7 +89,7 @@ class sfp_callername(SpiderFootPlugin):
location_match = re.findall(r'<div class="callerid"><h4>.*?</h4><p>(.+?)</p></div>', res['content'], re.MULTILINE | re.DOTALL)
- if location_match is not None:
+ if location_match:
location = location_match[0]
if len(location) < 5 or len(location) > 100:
@@ -101,7 +101,7 @@ class sfp_callername(SpiderFootPlugin):
rep_good_match = re.findall(r'>SAFE.*?>(\d+) votes?<', res['content'])
rep_bad_match = re.findall(r'>UNSAFE.*?>(\d+) votes?<', res['content'])
- if rep_good_match is not None and rep_bad_match is not None:
+ if rep_good_match and rep_bad_match:
good_votes = int(rep_good_match[0])
bad_votes = int(rep_bad_match[0])
diff --git a/modules/sfp_dnsresolve.py b/modules/sfp_dnsresolve.py
index 35e0430d..5234ec57 100644
--- a/modules/sfp_dnsresolve.py
+++ b/modules/sfp_dnsresolve.py
@@ -170,7 +170,7 @@ class sfp_dnsresolve(SpiderFootPlugin):
return None
pat = re.compile("(%..)?([a-zA-Z0-9\-\.]+\." + name + ")", re.IGNORECASE)
matches = re.findall(pat, data)
- if matches is not None:
+ if matches:
for match in matches:
self.processHost(match[1], parentEvent, False)
# Nothing left to do with internal links and raw data
diff --git a/modules/sfp_hackertarget.py b/modules/sfp_hackertarget.py
index bce28982..205791bc 100644
--- a/modules/sfp_hackertarget.py
+++ b/modules/sfp_hackertarget.py
@@ -97,13 +97,13 @@ class sfp_hackertarget(SpiderFootPlugin):
html_data = re.findall(r'<pre id="formResponse">(.*?)</pre>', res['content'], re.MULTILINE | re.DOTALL)
- if html_data is None:
+ if not html_data:
self.sf.debug("Found no open UDP ports on " + ip)
return None
open_ports = re.findall(r'(\d+)/udp\s+open\s+', html_data[0])
- if open_ports is None:
+ if not open_ports:
self.sf.debug("Found no open UDP ports on " + ip)
return None
@@ -122,13 +122,13 @@ class sfp_hackertarget(SpiderFootPlugin):
html_data = re.findall(r'<pre id="formResponse">(.*?)</pre>', res['content'], re.MULTILINE | re.DOTALL)
- if html_data is None:
+ if not html_data:
self.sf.debug("Found no open TCP ports on " + ip)
return None
open_ports = re.findall(r'(\d+)/tcp\s+open\s+', html_data[0])
- if open_ports is None:
+ if not open_ports:
self.sf.debug("Found no open TCP ports on " + ip)
return None
diff --git a/modules/sfp_numinfo.py b/modules/sfp_numinfo.py
index a84e58ed..eae95961 100644
--- a/modules/sfp_numinfo.py
+++ b/modules/sfp_numinfo.py
@@ -103,7 +103,7 @@ class sfp_numinfo(SpiderFootPlugin):
if data.get('email'):
email_match = re.findall(r'^mailto:([a-zA-Z\.0-9_\-]+@[a-zA-Z\.0-9\-]+\.[a-zA-Z\.0-9\-]+)$', data.get('email'))
- if email_match is not None:
+ if email_match:
mailDom = email_match[0].lower().split('@')[1]
if not self.getTarget().matches(mailDom):
evttype = "AFFILIATE_EMAILADDR"