SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Bug fixes.
smicallef204888c323d1
diff --git a/dyn/HEADER.tmpl b/dyn/HEADER.tmplindex f94ed700..13ee6145 100644--- a/dyn/HEADER.tmpl+++ b/dyn/HEADER.tmpl@@ -84,10 +84,11 @@<h3>SpiderFoot 2.0</h3></div><div class="modal-body">- <p>SpiderFoot is an open source GPL-licensed footprinting tool, designed to be easy to use, fast and extensible.</p>+ <p>SpiderFoot is an open source footprinting tool, created by <a href='http://www.binarypool.com' target=_new>Steve Micallef</a>. It is designed to be easy to use, fast and extensible.</p><p>If you have any bugs to report, or requests for enhancements, please contact the support mailing list at <a href=mailto:[email protected]>[email protected]</a>.<br><p>You are running version <b>2.0.0</b>.</p>+ <p> Visit the project website at <a href='http://www.spiderfoot.net' target=_new>http://www.spiderfoot.net</a>.</p></div><div class="modal-footer"><a href="#" data-dismiss="modal" class="btn">Close</a>diff --git a/dyn/scaninfo.tmpl b/dyn/scaninfo.tmplindex 208d3b51..536abb3b 100644--- a/dyn/scaninfo.tmpl+++ b/dyn/scaninfo.tmpl@@ -116,9 +116,13 @@crumbs += eventTypeLabel + "</a></li></ul>";var table = "<table id='scansummary-content' class='table table-bordered table-striped small'>";- table += "<thead><tr> <th>Data Element</th><th>Source Data Element</th><th>Source Module</th><th>Identified</th></tr></thead><tbody>";+ table += "<thead><tr> <th>Data Element</th><th>Confidence</th><th>Visibility</th><th>Risk</th>";+ table += "<th>Source Data Element</th><th>Source Module</th><th>Identified</th></tr></thead><tbody>";for (var i = 0; i < data.length; i++) {table += "<tr><td><pre style='border: 0px; background-color: inherit'>" + data[i][1];+ table += "</pre></td><td><pre style='border: 0px; background-color: inherit'>" + data[i][4];+ table += "</pre></td><td><pre style='border: 0px; background-color: inherit'>" + data[i][5];+ table += "</pre></td><td><pre style='border: 0px; background-color: inherit'>" + data[i][6];table += "</pre></td><td><pre style='border: 0px; background-color: inherit'>" + data[i][2];table += "</pre></td><td><pre style='border: 0px; background-color: inherit'>" + data[i][3];table += "</pre></td><td><pre style='border: 0px; background-color: inherit'>" + data[i][0];diff --git a/dyn/scanlist.tmpl b/dyn/scanlist.tmplindex 693b0952..d1aea863 100644--- a/dyn/scanlist.tmpl+++ b/dyn/scanlist.tmpl@@ -32,14 +32,13 @@table += "<td>" + data[i][2] + " <a rel='tooltip' title='Visit target' target='_new' href='http://" + data[i][2] + "'><i class='icon-share icon-gray'></a></td>";table += "<td>" + data[i][3] + "</td>";table += "<td>" + data[i][5] + "</td>";-if (data[i][6] == "FINISHED") {statusy = "badge-success";}if (data[i][6].startsWith("ABORT")) {statusy = "badge-warning";}- if (data[i][6] == "RUNNING" || data[i][6] == "STARTED") {+ if (data[i][6] == "RUNNING" || data[i][6] == "STARTED" || data[i][6] == "STARTING") {statusy = "badge-info";}if (data[i][6].endsWith("FAILED")) {diff --git a/modules/sfp_ripe.py b/modules/sfp_ripe.pyindex 0994fd32..129cd29f 100644--- a/modules/sfp_ripe.py+++ b/modules/sfp_ripe.py@@ -67,7 +67,7 @@ class sfp_ripe(SpiderFootPlugin):j = json.loads(res['content'])nslist = j["data"]["authoritative_nameservers"]for ns in nslist:- nsclean = ns.rstrip('.')+ nsclean = ns.rstrip('.').lower()if not nsclean.endswith(self.baseDomain):evt = SpiderFootEvent("AFFILIATE", nsclean, self.__name__, event)self.notifyListeners(evt)@@ -85,6 +85,10 @@ class sfp_ripe(SpiderFootPlugin):j = json.loads(res['content'])prefix = j["data"]["prefix"]+ if prefix == None:+ sf.debug("Could not identify network prefix.")+ return None+# Now see who owns the prefixres = sf.fetchUrl("http://stat.ripe.net/data/whois/data.json?resource=" + prefix)if res['content'] == None:@@ -111,7 +115,7 @@ class sfp_ripe(SpiderFootPlugin):j = json.loads(res['content'])nslist = j["data"]["authoritative_nameservers"]for ns in nslist:- nsclean = ns.rstrip('.')+ nsclean = ns.rstrip('.').lower()if not nsclean.endswith(self.baseDomain):evt = SpiderFootEvent("AFFILIATE", nsclean, self.__name__)self.notifyListeners(evt)diff --git a/modules/sfp_spider.py b/modules/sfp_spider.pyindex 8a4a072f..39581edb 100644--- a/modules/sfp_spider.py+++ b/modules/sfp_spider.py@@ -41,8 +41,8 @@ class sfp_spider(SpiderFootPlugin):'robotsonly': "Only follow links specified by robots.txt?",'pause': "Number of seconds to pause between fetches.",'start': "Prepend targets with these until you get a hit, to start spidering.",- 'maxpages': "Maximum number of pages to fetch.",- 'maxlevels': "Maximum levels to traverse within a site.",+ 'maxpages': "Maximum number of pages to fetch per target identified.",+ 'maxlevels': "Maximum levels to traverse per target identified.",'filterfiles': "File extensions to ignore (don't fetch them.)",'filterusers': "Skip spidering of /~user directories?",'noexternal': "Skip spidering of external sites? (**dangerous if False**)",@@ -209,7 +209,7 @@ class sfp_spider(SpiderFootPlugin):spiderTarget = prefix + eventDatabreak- sf.debug("Initiating spider of " + spiderTarget)+ sf.info("Initiating spider of " + spiderTarget)# Link the spidered URL to the event that triggered itself.urlEvents[spiderTarget] = eventdiff --git a/sfdb.py b/sfdb.pyindex a992d5ae..a529e030 100644--- a/sfdb.py+++ b/sfdb.py@@ -156,7 +156,8 @@ class SpiderFootDb:def scanResultEvent(self, instanceId, eventType='ALL'):qry = "SELECT ROUND(c.generated) AS generated, c.data, \s.data as 'source_data', \- c.module, c.type FROM tbl_scan_results c, tbl_scan_results s \+ c.module, c.type, c.confidence, c.visibility, c.risk \+ FROM tbl_scan_results c, tbl_scan_results s \WHERE c.scan_instance_id = ? AND c.source_event_hash = s.hash AND \s.scan_instance_id = c.scan_instance_id"qvars = [instanceId]diff --git a/sfdbsetup.py b/sfdbsetup.pyindex 21d50242..8b853e48 100644--- a/sfdbsetup.py+++ b/sfdbsetup.py@@ -33,6 +33,7 @@ class SpiderFootDbInit:def create(self):queries = [+ "PRAGMA journal_mode=WAL","CREATE TABLE tbl_event_types ( \event VARCHAR NOT NULL PRIMARY KEY, \event_descr VARCHAR NOT NULL, \diff --git a/sflib.py b/sflib.pyindex 4bd21159..b9bf9b29 100644--- a/sflib.py+++ b/sflib.py@@ -441,6 +441,8 @@ class SpiderFootPlugin(object):_stopScanning = False# Modules that will be notified when this module produces events_listenerModules = list()+ # Current event being processed+ _currentEvent = None# Name of this module, set at startup time__name__ = "module_name_not_set!"@@ -485,6 +487,7 @@ class SpiderFootPlugin(object):#print listener.__module__ + " not listening for " + eventNamecontinue#print "Notifying " + eventName + " to " + listener.__module__+ listener._currentEvent = sfEventlistener.handleEvent(sfEvent)# Called to stop scanning@@ -555,10 +558,10 @@ class SpiderFootEvent(object):return "ROOT"# Handle lists and dicts- if type(self.data) != str or type(self.data) != unicode:+ if type(self.data) not in [str, unicode]:usedata = str(self.data)else:- usedata = unicode(usedata, 'ascii', errors='ignore')+ usedata = self.datareturn hashlib.sha256(self.eventType + usedata + \unicode(self.generated) + self.module).hexdigest()diff --git a/sfwebui.py b/sfwebui.pyindex 47e7d5ee..fc8214b5 100644--- a/sfwebui.py+++ b/sfwebui.py@@ -270,7 +270,7 @@ class SpiderFootWebUi:for row in data:lastseen = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(row[0]))escaped = cgi.escape(row[1])- retdata.append([lastseen, escaped, row[2], row[3]])+ retdata.append([lastseen, escaped, row[2], row[3], row[5], row[6], row[7]])return json.dumps(retdata, ensure_ascii=False)scaneventresults.exposed = Truediff --git a/spiderfoot.schema b/spiderfoot.schemaindex cceb6590..2374882a 100644--- a/spiderfoot.schema+++ b/spiderfoot.schema@@ -14,6 +14,8 @@-- with any SQL-compliant RDBMS.--+PRAGMA journal_mode=WAL;+---- Descriptions of event types--