SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
sfwebui: Fix scaninfo buttons and newscan tables
Brendan Colesce44a14a95f6
diff --git a/dyn/newscan.tmpl b/dyn/newscan.tmplindex 9c9f6038..04f9fb19 100644--- a/dyn/newscan.tmpl+++ b/dyn/newscan.tmpl@@ -20,7 +20,7 @@<li id='usetab' class="active"><a onClick='switchTab("use")' href='#'>By Use Case</a></li><li id='typetab'><a onClick='switchTab("type")' href='#'>By Required Data</a></li><li id='moduletab'><a onClick='switchTab("module")' href='#'>By Module</a></li>- <div class='text-right hidden' id='selectors'>+ <div class='text-right' id='selectors' style='display: none'><button type="button" onClick='selectAll()' class="btn-mini btn-info">Select All</button> <button type="button" onClick='deselectAll()' class="btn-mini btn-info">De-Select All</button></div>@@ -36,7 +36,7 @@</td></tr></table>- <table class="table table-striped table-condensed hidden" id="moduletable">+ <table class="table table-striped table-condensed" id="moduletable" style="display: none"><%modlist = dict()for item in modules:@@ -59,7 +59,7 @@% endif% endfor</table>- <table class="table table-striped table-condensed hidden" id="typetable">+ <table class="table table-striped table-condensed" id="typetable" style="display: none"><% count = 0 %>% for item in sorted(types):% if count % 2 == 0:@@ -82,4 +82,18 @@</div></div></form>+<script type='text/javascript'>+ $('#scantarget').popover({ 'html': true, 'animation': true, 'trigger': 'focus'});+ if ("${selectedmods}" != "") {+ switchTab("module");++ $("input[id^=module_]").each(function(id, obj) {+ if ("${selectedmods}".indexOf(obj.id.replace("module_", "")) >= 0) {+ $("#" + obj.id).attr("checked", true);+ } else {+ $("#" + obj.id).attr("checked", false);+ }+ });+ }+</script><%include file="FOOTER.tmpl"/>diff --git a/dyn/scaninfo.tmpl b/dyn/scaninfo.tmplindex 6a592961..9ae235e3 100644--- a/dyn/scaninfo.tmpl+++ b/dyn/scaninfo.tmpl@@ -253,14 +253,14 @@grid += "<div class='row'>"grid += "<div class='span12'>"grid += "<div class='btn-toolbar text-center'>"- grid += "<div class='btn-group'><button class='btn disabled btn-large'><span class='font-size-36-px'>Total</span></button>"- grid += "<button class='btn disabled btn-inverse btn-large' id='tcounter'><span class='font-size-36-px'>?</span></button></div>"- grid += "<div class='btn-group'><button class='btn disabled btn-large'><span class='font-size-36-px'>Unique</span></button>"- grid += "<button class='btn disabled btn-inverse btn-large' id='ucounter'><span class='font-size-36-px'>?</span></button></div>"- grid += "<div class='btn-group'><button class='btn disabled btn-large'><span class='font-size-36-px'>Status</span></button>"- grid += "<button class='btn disabled btn-inverse btn-large' id='status'><span class='font-size-36-px'>?</span></button></div>"- grid += "<div class='btn-group'><button class='btn disabled btn-large'><span class='font-size-36-px'>Errors</span></button>"- grid += "<button class='btn disabled btn-inverse btn-large' id='errors'><span class='font-size-36-px'>?</span></button></div>"+ grid += "<div class='btn-group'><button class='btn disabled btn-large' style='font-size: 36px'>Total</span></button>"+ grid += "<button class='btn disabled btn-inverse btn-large' id='tcounter' style='font-size: 36px'>?</button></div>"+ grid += "<div class='btn-group'><button class='btn disabled btn-large' style='font-size: 36px'>Unique</button>"+ grid += "<button class='btn disabled btn-inverse btn-large' id='ucounter' style='font-size: 36px'>?</button></div>"+ grid += "<div class='btn-group'><button class='btn disabled btn-large' style='font-size: 36px'>Status</button>"+ grid += "<button class='btn disabled btn-inverse btn-large' id='status' style='font-size: 36px'>?</button></div>"+ grid += "<div class='btn-group'><button class='btn disabled btn-large' style='font-size: 36px'>Errors</button>"+ grid += "<button class='btn disabled btn-inverse btn-large' id='errors' style='font-size: 36px'>?</button></div>"grid += "</div></div></div><br>"grid += "<div class='row'>"grid += "<div class='span12 height-480-px' id='vbarsummary'></div>"diff --git a/sfwebui.py b/sfwebui.pyindex 5ab780fe..b9d14640 100644--- a/sfwebui.py+++ b/sfwebui.py@@ -61,7 +61,7 @@ class SpiderFootWebUi:'request.error_response': self.error_page})- secure_headers = SecureHeaders(csp="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self'")+ secure_headers = SecureHeaders(csp="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'")cherrypy.config.update({"tools.response_headers.on": True,diff --git a/static/js/spiderfoot.newscan.js b/static/js/spiderfoot.newscan.jsindex cd2c1947..aa7bed52 100644--- a/static/js/spiderfoot.newscan.js+++ b/static/js/spiderfoot.newscan.js@@ -38,16 +38,3 @@$("[id^="+activeTab+"_]").prop("checked", false);}- $('#scantarget').popover({ 'html': true, 'animation': true, 'trigger': 'focus'});- if ("${selectedmods}" != "") {- switchTab("module");-- $("input[id^=module_]").each(function(id, obj) {- if ("${selectedmods}".indexOf(obj.id.replace("module_", "")) >= 0) {- $("#" + obj.id).attr("checked", true);- } else {- $("#" + obj.id).attr("checked", false);- }- });- }-