SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Hide stack traces unless debugging is enabled
bcoles8d33c420ed39
diff --git a/sfwebui.py b/sfwebui.pyindex 070d5be7..a26afd09 100644--- a/sfwebui.py+++ b/sfwebui.py@@ -16,6 +16,7 @@ import csvimport timeimport randomimport re+from cherrypy import _cperrorfrom operator import itemgetterfrom copy import deepcopyfrom mako.lookup import TemplateLookup@@ -50,7 +51,8 @@ class SpiderFootWebUi:self.docroot = self.config['__docroot'].rstrip('/')cherrypy.config.update({- 'error_page.404': self.error_page_404+ 'error_page.404': self.error_page_404,+ 'request.error_response': self.error_page})print("")@@ -62,6 +64,14 @@ class SpiderFootWebUi:print("")print("")+ def error_page(self):+ cherrypy.response.status = 500++ if self.config['_debug']:+ cherrypy.response.body = _cperror.get_error_page(status=500, traceback=_cperror.format_exc())+ else:+ cherrypy.response.body = '<html><body>Error</body></html>'+def error_page_404(self, status, message, traceback, version):templ = Template(filename='dyn/error.tmpl', lookup=self.lookup)return templ.render(message='Not Found', docroot=self.docroot, status=status)