Skip to content

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

Loading indicators & bug fixes.

smicallef9bdbdd3d3bf9
diff --git a/dyn/scaninfo.tmpl b/dyn/scaninfo.tmpl
index 7f487e04..2a10f9e0 100644
--- a/dyn/scaninfo.tmpl
+++ b/dyn/scaninfo.tmpl
@@ -2,16 +2,22 @@
<h2>${name}</h2>
<div class="btn-toolbar">
<div class="btn-group">
- <a class="btn active" href="#" onClick='exploreEventList("${id}")'>Explore</a>
+ <a class="btn active" href="#" onClick='browseEventList("${id}")'>Browse</a>
<a class="btn" href="#">Config</a>
- <a class="btn" href="#">Compare</a>
- <a class="btn" href="#">Export</a>
<a class="btn" href="#">Search</a>
</div>
</div>
+
+<div id=loader>
+Loading...
+<div class="progress progress-striped active">
+ <div class="bar" style="width: 100%"></div>
+</div>
+</div>
+
<script type='text/javascript'>
// Summary of event types and counts for a scan
- function exploreEventList(instanceId) {
+ function browseEventList(instanceId) {
// Remove pre-existing tables if they exist
$("#scansummary-content").remove();
sf.fetchData('/scansummary', {'id': instanceId}, function(data) {
@@ -19,19 +25,21 @@
table += "<thead><tr> <th>Type</th> <th>Events</th><th>Last Provided</th></tr></thead><tbody>";
for (var i = 0; i < data.length; i++) {
table += "<tr><td><a onClick='";
- table += "exploreEventData(\"${id}\", \"" + data[i][0] + "\")' href='#'>";
+ table += "browseEventData(\"${id}\", \"" + data[i][0] + "\")' href='#'>";
table += data[i][1] + "</a></td>";
table += "<td>" + data[i][3] + "</td>";
table += "<td>" + data[i][2] + "</td>";
}
table += "</tbody></table>"
+ $("#loader").fadeOut(250);
$("#mainbody").append(table);
});
}
// Detailed view of data for an event type for a scan
- function exploreEventData(instanceId, eventType) {
+ function browseEventData(instanceId, eventType) {
$("#scansummary-content").remove();
+ $("#loader").show();
sf.fetchData('/scaneventresults', {'id': instanceId, 'eventType': eventType }, function(data) {
var table = "<table id='scansummary-content' class='table table-bordered table-striped'>";
table += "<thead><tr> <th>Data Element</th><th>Obtained</th><th>Source</th><th>Module</th></tr></thead><tbody>";
@@ -39,11 +47,12 @@
table += "<tr><td>" + data[i][1] + "</td><td>" + data[i][0] + "</td><td>" + data[i][2] + "</td><td>" + data[i][3] + "</td></tr>";
}
table += "</tbody></table>"
+ $("#loader").fadeOut(250);
$("#mainbody").append(table);
});
}
- exploreEventList("${id}");
+ browseEventList("${id}");
</script>
<%include file="FOOTER.tmpl"/>
diff --git a/dyn/scanlist.tmpl b/dyn/scanlist.tmpl
index c9b65b3f..d23fe3c5 100644
--- a/dyn/scanlist.tmpl
+++ b/dyn/scanlist.tmpl
@@ -7,6 +7,12 @@
Scan '${newscan}' has successfully been initiated. Reload this page for up-to-date status on the scan.
</div>
% endif
+<div id=loader>
+Loading...
+<div class="progress progress-striped active">
+ <div class="bar" style="width: 100%"></div>
+</div>
+</div>
<script type='text/javascript'>
sf.fetchData('/scanlist', null, function(data) {
var table = "<table class='table table-bordered table-striped'>";
@@ -20,6 +26,7 @@
table += "<td>" + data[i][7] + "</td></tr>";
}
table += "</tbody></table>"
+ $("#loader").fadeOut(250);
$("#mainbody").append(table);
});
</script>
diff --git a/modules/sfp_dns.py b/modules/sfp_dns.py
index 561a3843..237f7c6b 100644
--- a/modules/sfp_dns.py
+++ b/modules/sfp_dns.py
@@ -79,7 +79,7 @@ class sfp_dns(SpiderFootPlugin):
else:
addrs = socket.gethostbyaddr(eventData)
except socket.error as e:
- sf.debug("Unable to resolve " + eventData + ", (" + e.message + ")")
+ sf.debug("Unable to resolve " + eventData)
return None
# First element of tuple is primary hostname if requested name is
diff --git a/sfwebui.py b/sfwebui.py
index 0b12ae93..983c1f52 100644
--- a/sfwebui.py
+++ b/sfwebui.py
@@ -62,7 +62,7 @@ class SpiderFootDataProvider:
lastseen = time.strftime("%d/%m/%Y %H:%M:%S", time.localtime(row[0]))
escaped = cgi.escape(row[1])
retdata.append([lastseen, escaped, row[2], row[3]])
- return json.dumps(retdata)
+ return json.dumps(retdata, ensure_ascii=False)
def startScan(self, name, target, moduleList, moduleOpts):
dbh = SpiderFootDb(self.config)
@@ -184,6 +184,10 @@ class SpiderFootWebUi:
# Initiate a scan
def startscan(self, scanname, scantarget, modulelist):
modopts = dict()
+
+ if scanname == "" or scantarget == "" or modulelist == "":
+ return self.error("Form incomplete.")
+
modlist = modulelist.replace('module_', '').split(',')
# For now we don't permit multiple simultaneous scans