Skip to content

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

Fix false positives from sfp_dnsbrute and reduce log noise.

smicallef05aad999b664
diff --git a/modules/sfp_dnsbrute.py b/modules/sfp_dnsbrute.py
index 4072174d..6870cdc7 100644
--- a/modules/sfp_dnsbrute.py
+++ b/modules/sfp_dnsbrute.py
@@ -87,8 +87,9 @@ class sfp_dnsbrute(SpiderFootPlugin):
def tryHost(self, name):
try:
addrs = self.sf.resolveHost(name)
- with self.lock:
- self.hostResults[name] = True
+ if addrs:
+ with self.lock:
+ self.hostResults[name] = True
except BaseException as e:
with self.lock:
self.hostResults[name] = False
@@ -140,6 +141,9 @@ class sfp_dnsbrute(SpiderFootPlugin):
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
+ if srcModuleName == "sfp_dnsbrute":
+ return None
+
if eventDataHash in self.events:
return None
self.events[eventDataHash] = True
diff --git a/sfdb.py b/sfdb.py
index 62c1aad3..8ab61071 100644
--- a/sfdb.py
+++ b/sfdb.py
@@ -368,12 +368,12 @@ class SpiderFootDb:
))
self.conn.commit()
except sqlite3.Error as e:
- if "locked" in e.args[0]:
+ if "locked" in e.args[0] or "thread" in e.args[0]:
# TODO: Do something smarter here to handle locked databases
- print("Couldn't log due to locking issue.")
+ #print("[warning] Couldn't log due to SQLite limitations. You can probably ignore this.")
#self.sf.fatal("Unable to log event in DB due to lock: " + e.args[0])
else:
- print("Couldn't log due to: " + str(e.args[0]))
+ print("[warning] Couldn't log due to: " + str(e.args[0]))
#self.sf.fatal("Unable to log event in DB: " + e.args[0])
return True