SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Dynamically change the status badge.
smicallefb35ac9ef257c
diff --git a/dyn/scaninfo.tmpl b/dyn/scaninfo.tmplindex 2306d476..8a1520e5 100644--- a/dyn/scaninfo.tmpl+++ b/dyn/scaninfo.tmpl@@ -11,7 +11,7 @@statusy = "alert-danger"end%>-<h2>${name} <span class='badge ${statusy}'>${status}</span> <img id="loader" src="${docroot}/static/img/loader.gif"></h2>+<h2>${name} <span id='scanstatusbadge' class='badge ${statusy}'>${status}</span> <img id="loader" src="${docroot}/static/img/loader.gif"></h2><div class="btn-toolbar" role="toolbar" style='padding-bottom: 10px'><div class="btn-group"><a id='btn-status' class="btn btn-default" onClick='scanSummaryView("${id}")'><i class='glyphicon glyphicon-eye-open'></i> Summary</a>@@ -345,6 +345,20 @@$('#ucounter').html(uniqueCount);$('#tcounter').html(totalCount);+ $('#scanstatusbadge').html(scanStatus);+ if (scanStatus == "FINISHED") {+ statusy = "alert-success";+ }+ if (scanStatus.indexOf("ABORT") >= 0) {+ statusy = "alert-warning";+ }+ if (scanStatus == "RUNNING" || scanStatus == "STARTED" || scanStatus == "STARTING" || scanStatus == "INITIALIZING") {+ statusy = "alert-info";+ }+ if (scanStatus.indexOf("FAILED") >= 0) {+ statusy = "alert-danger";+ }+ $('#scanstatusbadge').removeClass(["alert-info", "alert-warning", "alert-danger"]).addClass(statusy);$('#status').html(scanStatus);$("#vbarsummary").empty();sf_viz_vbar("#vbarsummary", scanSummary);