Skip to content

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

Hiding the unnecessary ROOT event.

smicallef1e637b89f5a1
diff --git a/sfdb.py b/sfdb.py
index 7cc8d5db..d1835b6d 100644
--- a/sfdb.py
+++ b/sfdb.py
@@ -614,7 +614,7 @@ class SpiderFootDb:
qry = "SELECT i.guid, i.name, i.seed_target, ROUND(i.created/1000), \
ROUND(i.started)/1000 as started, ROUND(i.ended)/1000, i.status, COUNT(r.type) \
FROM tbl_scan_instance i, tbl_scan_results r WHERE i.guid = r.scan_instance_id \
- GROUP BY i.guid \
+ AND r.type <> 'ROOT' GROUP BY i.guid \
UNION ALL \
SELECT i.guid, i.name, i.seed_target, ROUND(i.created/1000), \
ROUND(i.started)/1000 as started, ROUND(i.ended)/1000, i.status, '0' \
diff --git a/sfwebui.py b/sfwebui.py
index 42e29ea2..16f9aa5f 100644
--- a/sfwebui.py
+++ b/sfwebui.py
@@ -116,6 +116,8 @@ class SpiderFootWebUi:
parser = csv.writer(fileobj, dialect=dialect)
parser.writerow(["Updated", "Type", "Module", "Source", "Data"])
for row in data:
+ if row[4] == "ROOT":
+ continue
lastseen = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(row[0]))
datafield = str(row[1]).replace("<SFURL>", "").replace("</SFURL>", "")
parser.writerow([lastseen, str(row[4]), str(row[3]), str(row[2]), datafield])
@@ -139,6 +141,8 @@ class SpiderFootWebUi:
parser = csv.writer(fileobj, dialect=dialect)
parser.writerow(["Scan Name", "Updated", "Type", "Module", "Source", "Data"])
for row in data:
+ if row[4] == "ROOT":
+ continue
lastseen = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(row[0]))
datafield = str(row[1]).replace("<SFURL>", "").replace("</SFURL>", "")
parser.writerow([scaninfo[row[12]][0], lastseen, str(row[4]), str(row[3]), str(row[2]), datafield])
@@ -156,6 +160,8 @@ class SpiderFootWebUi:
parser = csv.writer(fileobj, dialect=dialect)
parser.writerow(["Updated", "Type", "Module", "Source", "Data"])
for row in data:
+ if row[10] == "ROOT":
+ continue
datafield = str(row[1]).replace("<SFURL>", "").replace("</SFURL>", "")
parser.writerow([row[0], str(row[10]), str(row[3]), str(row[2]), datafield])
cherrypy.response.headers['Content-Disposition'] = "attachment; filename=SpiderFoot.csv"
@@ -665,6 +671,8 @@ class SpiderFootWebUi:
data = dbh.scanResultSummary(id)
retdata = []
for row in data:
+ if row[0] == "ROOT":
+ continue
lastseen = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(row[2]))
retdata.append([row[0], row[1], lastseen, row[3], row[4]])
return json.dumps(retdata)