SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
sfwebui: move static directory to spiderfoot package directory (#1235)
bcoles1917477162e4
diff --git a/sf.py b/sf.pyindex 5f557f75..8ebc1f87 100755--- a/sf.py+++ b/sf.py@@ -71,7 +71,8 @@ def main():sfWebUiConfig = {'host': '127.0.0.1','port': 5001,- 'root': '/'+ 'root': '/',+ 'cors_origins': [],}# 'Global' configuration options@@ -455,10 +456,7 @@ def start_web_server(sfWebUiConfig, sfConfig):web_host = sfWebUiConfig.get('host', '127.0.0.1')web_port = sfWebUiConfig.get('port', 5001)web_root = sfWebUiConfig.get('root', '/')-- # Place your whitelisted CORS origins here- # Example: cors_origins = ['http://example.com']- cors_origins = []+ cors_origins = sfWebUiConfig.get('cors_origins', [])cherrypy.config.update({'log.screen': False,@@ -468,9 +466,6 @@ def start_web_server(sfWebUiConfig, sfConfig):log.info(f"Starting web server at {web_host}:{web_port} ...")- # Disable auto-reloading of content- cherrypy.engine.autoreload.unsubscribe()-sf = SpiderFoot(sfConfig)# Enable access to static files via the web directory@@ -482,7 +477,7 @@ def start_web_server(sfWebUiConfig, sfConfig):'/static': {'tools.staticdir.on': True,'tools.staticdir.dir': 'static',- 'tools.staticdir.root': sf.myPath()+ 'tools.staticdir.root': f"{sf.myPath()}/spiderfoot"}}@@ -548,17 +543,14 @@ def start_web_server(sfWebUiConfig, sfConfig):if using_ssl:url = "https://"- cors_origins.append(f"https://{web_host}:{web_port}")else:url = "http://"- cors_origins.append(f"http://{web_host}:{web_port}")if web_host == "0.0.0.0": # nosec- url = f"{url}<IP of this host>"+ url = f"{url}127.0.0.1:{web_port}"else:- url = f"{url}{web_host}"-- url = f"{url}:{web_port}{web_root}"+ url = f"{url}{web_host}:{web_port}{web_root}"+ cors_origins.append(url)cherrypy_cors.install()cherrypy.config.update({@@ -574,6 +566,9 @@ def start_web_server(sfWebUiConfig, sfConfig):print("*************************************************************")print("")+ # Disable auto-reloading of content+ cherrypy.engine.autoreload.unsubscribe()+cherrypy.quickstart(SpiderFootWebUi(sfWebUiConfig, sfConfig), script_name=web_root, config=conf)diff --git a/static/css/alertify.min.css b/spiderfoot/static/css/alertify.min.csssimilarity index 100%rename from static/css/alertify.min.cssrename to spiderfoot/static/css/alertify.min.cssdiff --git a/static/css/bootstrap.min.css b/spiderfoot/static/css/bootstrap.min.csssimilarity index 100%rename from static/css/bootstrap.min.cssrename to spiderfoot/static/css/bootstrap.min.cssdiff --git a/static/css/dark.css b/spiderfoot/static/css/dark.csssimilarity index 100%rename from static/css/dark.cssrename to spiderfoot/static/css/dark.cssdiff --git a/static/css/spiderfoot.css b/spiderfoot/static/css/spiderfoot.csssimilarity index 100%rename from static/css/spiderfoot.cssrename to spiderfoot/static/css/spiderfoot.cssdiff --git a/static/css/tablesorter-theme.default.min.css b/spiderfoot/static/css/tablesorter-theme.default.min.csssimilarity index 100%rename from static/css/tablesorter-theme.default.min.cssrename to spiderfoot/static/css/tablesorter-theme.default.min.cssdiff --git a/static/fonts/glyphicons-halflings-regular.woff b/spiderfoot/static/fonts/glyphicons-halflings-regular.woffsimilarity index 100%rename from static/fonts/glyphicons-halflings-regular.woffrename to spiderfoot/static/fonts/glyphicons-halflings-regular.woffdiff --git a/static/fonts/glyphicons-halflings-regular.woff2 b/spiderfoot/static/fonts/glyphicons-halflings-regular.woff2similarity index 100%rename from static/fonts/glyphicons-halflings-regular.woff2rename to spiderfoot/static/fonts/glyphicons-halflings-regular.woff2diff --git a/static/img/loader.gif b/spiderfoot/static/img/loader.gifsimilarity index 100%rename from static/img/loader.gifrename to spiderfoot/static/img/loader.gifdiff --git a/static/img/spiderfoot-header-dark.png b/spiderfoot/static/img/spiderfoot-header-dark.pngsimilarity index 100%rename from static/img/spiderfoot-header-dark.pngrename to spiderfoot/static/img/spiderfoot-header-dark.pngdiff --git a/static/img/spiderfoot-header.png b/spiderfoot/static/img/spiderfoot-header.pngsimilarity index 100%rename from static/img/spiderfoot-header.pngrename to spiderfoot/static/img/spiderfoot-header.pngdiff --git a/static/img/spiderfoot-icon.png b/spiderfoot/static/img/spiderfoot-icon.pngsimilarity index 100%rename from static/img/spiderfoot-icon.pngrename to spiderfoot/static/img/spiderfoot-icon.pngdiff --git a/static/js/LICENSE.d3 b/spiderfoot/static/js/LICENSE.d3similarity index 100%rename from static/js/LICENSE.d3rename to spiderfoot/static/js/LICENSE.d3diff --git a/static/js/alertify.min.js b/spiderfoot/static/js/alertify.min.jssimilarity index 100%rename from static/js/alertify.min.jsrename to spiderfoot/static/js/alertify.min.jsdiff --git a/static/js/bootstrap.min.js b/spiderfoot/static/js/bootstrap.min.jssimilarity index 100%rename from static/js/bootstrap.min.jsrename to spiderfoot/static/js/bootstrap.min.jsdiff --git a/static/js/d3.min.js b/spiderfoot/static/js/d3.min.jssimilarity index 100%rename from static/js/d3.min.jsrename to spiderfoot/static/js/d3.min.jsdiff --git a/static/js/jquery.min.js b/spiderfoot/static/js/jquery.min.jssimilarity index 100%rename from static/js/jquery.min.jsrename to spiderfoot/static/js/jquery.min.jsdiff --git a/static/js/jquery.tablesorter.min.js b/spiderfoot/static/js/jquery.tablesorter.min.jssimilarity index 100%rename from static/js/jquery.tablesorter.min.jsrename to spiderfoot/static/js/jquery.tablesorter.min.jsdiff --git a/static/js/jquery.tablesorter.pager.min.js b/spiderfoot/static/js/jquery.tablesorter.pager.min.jssimilarity index 100%rename from static/js/jquery.tablesorter.pager.min.jsrename to spiderfoot/static/js/jquery.tablesorter.pager.min.jsdiff --git a/static/js/sigma.layout.forceAtlas2.min.js b/spiderfoot/static/js/sigma.layout.forceAtlas2.min.jssimilarity index 100%rename from static/js/sigma.layout.forceAtlas2.min.jsrename to spiderfoot/static/js/sigma.layout.forceAtlas2.min.jsdiff --git a/static/js/sigma.min.js b/spiderfoot/static/js/sigma.min.jssimilarity index 100%rename from static/js/sigma.min.jsrename to spiderfoot/static/js/sigma.min.jsdiff --git a/static/js/sigma.parsers.gexf.min.js b/spiderfoot/static/js/sigma.parsers.gexf.min.jssimilarity index 100%rename from static/js/sigma.parsers.gexf.min.jsrename to spiderfoot/static/js/sigma.parsers.gexf.min.jsdiff --git a/static/js/sigma.parsers.json.min.js b/spiderfoot/static/js/sigma.parsers.json.min.jssimilarity index 100%rename from static/js/sigma.parsers.json.min.jsrename to spiderfoot/static/js/sigma.parsers.json.min.jsdiff --git a/static/js/sigma.plugins.dragNodes.min.js b/spiderfoot/static/js/sigma.plugins.dragNodes.min.jssimilarity index 100%rename from static/js/sigma.plugins.dragNodes.min.jsrename to spiderfoot/static/js/sigma.plugins.dragNodes.min.jsdiff --git a/static/js/sigma.renderers.snapshot.min.js b/spiderfoot/static/js/sigma.renderers.snapshot.min.jssimilarity index 100%rename from static/js/sigma.renderers.snapshot.min.jsrename to spiderfoot/static/js/sigma.renderers.snapshot.min.jsdiff --git a/static/js/spiderfoot.js b/spiderfoot/static/js/spiderfoot.jssimilarity index 100%rename from static/js/spiderfoot.jsrename to spiderfoot/static/js/spiderfoot.jsdiff --git a/static/js/spiderfoot.newscan.js b/spiderfoot/static/js/spiderfoot.newscan.jssimilarity index 100%rename from static/js/spiderfoot.newscan.jsrename to spiderfoot/static/js/spiderfoot.newscan.jsdiff --git a/static/js/spiderfoot.opts.js b/spiderfoot/static/js/spiderfoot.opts.jssimilarity index 100%rename from static/js/spiderfoot.opts.jsrename to spiderfoot/static/js/spiderfoot.opts.jsdiff --git a/static/js/spiderfoot.scanlist.js b/spiderfoot/static/js/spiderfoot.scanlist.jssimilarity index 100%rename from static/js/spiderfoot.scanlist.jsrename to spiderfoot/static/js/spiderfoot.scanlist.jsdiff --git a/static/js/viz.js b/spiderfoot/static/js/viz.jssimilarity index 100%rename from static/js/viz.jsrename to spiderfoot/static/js/viz.jsdiff --git a/test/integration/test_sfwebui.py b/test/integration/test_sfwebui.pyindex b20f7281..3bce4762 100644--- a/test/integration/test_sfwebui.py+++ b/test/integration/test_sfwebui.py@@ -78,7 +78,7 @@ class TestSpiderFootWebUiRoutes(helper.CPWebCase):'/static': {'tools.staticdir.on': True,'tools.staticdir.dir': 'static',- 'tools.staticdir.root': sf.myPath()+ 'tools.staticdir.root': f"{sf.myPath()}/spiderfoot",}}