Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Tabbed UI.

smicallef41a54c092a26
diff --git a/dyn/newscan.tmpl b/dyn/newscan.tmpl
index c4fd8d3a..6a09047a 100644
--- a/dyn/newscan.tmpl
+++ b/dyn/newscan.tmpl
@@ -1,5 +1,8 @@
<%include file="HEADER.tmpl"/>
<script type='text/javascript'>
+ activeTab = "module";
+ alternateTab = "type";
+
function submitForm() {
modList = "";
$("[id^=module_]").each(function() {
@@ -10,6 +13,16 @@
$("#modulelist").val(modList);
}
+
+ function switchTab() {
+ $("#"+activeTab+"table").hide();
+ $("#"+activeTab+"tab").removeClass("active");
+ $("#"+alternateTab+"table").show();
+ $("#"+alternateTab+"tab").addClass("active");
+ tempTab = alternateTab;
+ alternateTab = activeTab;
+ activeTab = tempTab;
+ }
</script>
<h2>New Scan</h2>
% if alreadyRunning == True:
@@ -33,10 +46,30 @@ Another scan is currently running (${runningScan}). Please either wait for that
</div>
</div>
<div class="control-group">
- <label class="control-label" for="moduletable">Modules</label>
+ <ul class='nav nav-tabs'>
+ <li id='moduletab' class="active"><a onClick='switchTab()' href='#'>By Module</a></li>
+ <li id='typetab'><a onClick='switchTab()' href='#'>By Required Data</a></li>
+ <div style='text-align: right'>
+ <button onClick='selectAll()' class="btn-mini btn-info">Select All</button>&nbsp;&nbsp;
+ <button onClick='deselectAll()' class="btn-mini btn-info">De-Select All</button>
+ </div>
+ </ul>
<table class="table table-striped table-condensed" id="moduletable">
% for item in sorted(modules):
- <tr><td><input type=checkbox id="module_${item}" checked></td><td>${item}</td><td>${modules[item]['descr']}</td></tr>
+ <tr><td><input type=checkbox id="module_${item}" checked></td><td>${modules[item]['name']}</td><td>${modules[item]['descr']}</td></tr>
+ % endfor
+ </table>
+ <table class="table table-striped table-condensed" id="typetable" style='display: none'>
+ <% count = 0 %>
+ % for item in sorted(types):
+ % if count % 2 == 0:
+ <tr>
+ % endif
+ <td><input type=checkbox id="type_${item[1]}" checked></td><td>${item[0]}</td>
+ % if not count % 2 == 0:
+ </tr>
+ % endif
+ <% count = count + 1 %>
% endfor
</table>
</div>
diff --git a/dyn/opts.tmpl b/dyn/opts.tmpl
index 04b49db0..c91b46cf 100644
--- a/dyn/opts.tmpl
+++ b/dyn/opts.tmpl
@@ -1,5 +1,6 @@
<%include file="HEADER.tmpl"/>
<script type='text/javascript'>
+ activeTab = "global";
function saveSettings() {
var retarr = {}
$(":input").each(function(i) {
@@ -13,6 +14,14 @@
$("#allopts").val("RESET");
}
+ function switchTab(tab) {
+ $("#optsect_"+activeTab).hide();
+ $("#optsect_"+tab).show();
+ $("#tab_"+activeTab).removeClass("active");
+ $("#tab_"+tab).addClass("active");
+ activeTab = tab;
+ }
+
</script>
<h2>Settings</h2>
% if updated:
@@ -23,6 +32,21 @@
</div>
% endif
<form class="form" action='/savesettings' method='POST'>
+<div style='text-align: left'>
+ <input type=hidden id='allopts' name='allopts' value=''>
+ <button onClick='clearSettings();' class='btn btn-danger'>Reset to Factory Default</button>
+ <button onClick='saveSettings();' class='btn btn-primary'>Save Changes</button>
+<br><br>
+</div>
+
+<div class="tabbable tabs-left">
+<ul class="nav nav-tabs">
+<li id='tab_global' class="active"><a href='#' onClick='switchTab("global");'>Global</a></li>
+% for mod in sorted(opts['__modules__'].keys()):
+ <li id='tab_${mod}'><a href='#' onClick='switchTab("${mod}");' >${opts['__modules__'][mod]['name']}</a></li>
+% endfor
+</ul>
+<div id='optsect_global' class="tab-content">
<h4>Global Settings</h4>
<table class='table table-bordered table-striped'>
<thead><tr> <th>Option</th> <th>Value</th></tr></thead><tbody>
@@ -62,12 +86,15 @@
% endfor
</tbody>
</table>
-<br>
-<h4>Module Settings</h4>
-<table class='table table-bordered table-striped'>
-<thead><tr> <th>Module</th><th>Option</th> <th>Value</th></tr></thead><tbody>
+</div>
% for mod in sorted(opts['__modules__'].keys()):
<% modopts = opts['__modules__'][mod]['opts'] %>
+ <div id='optsect_${mod}' style='display: none' class="tab-content">
+ <h4>${mod} Settings</h4>
+ <table class='table table-bordered table-striped'>
+ <thead><tr> <th>Option</th> <th>Value</th></tr></thead>
+ <tbody>
+
% for opt in opts['__modules__'][mod]['opts'].keys():
% if not opt.startswith("_"):
<%
@@ -76,7 +103,8 @@
else:
optdesc = opts['__modules__'][mod]['optdescs'][opt]
%>
- <tr><td>${mod}</td><td>${optdesc}</td><td>
+
+ <tr><td>${optdesc}</td><td>
% if type(modopts[opt]) is int:
<input id='${mod}:${opt}' class='input-mini' type=text value="${modopts[opt]}">
% endif
@@ -109,13 +137,10 @@
</td></tr>
% endif
% endfor
+ </tbody>
+ </table>
+ </div>
% endfor
-</tbody>
-</table>
-<div style='text-align: right'>
- <input type=hidden id='allopts' name='allopts' value=''>
- <button onClick='clearSettings();' class='btn btn-danger'>Reset to Factory Default</button>
- <button onClick='saveSettings();' class='btn btn-primary'>Save Changes</button>
</div>
</form>
<br><br>