Skip to content

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

Full text for viewing saved config options.

smicallef73876dc012e0
diff --git a/dyn/scaninfo.tmpl b/dyn/scaninfo.tmpl
index ae45b5ca..0083102e 100644
--- a/dyn/scaninfo.tmpl
+++ b/dyn/scaninfo.tmpl
@@ -82,13 +82,13 @@ Loading...
table += "<tr><td>Status:</td><td>" + data['meta'][5] + "</td></tr>";
table += "</table>";
table += "<h4>Global Settings</h4>";
- table += "<table class='table table-bordered table-striped' style='width: 400px'>";
+ table += "<table class='table table-bordered table-striped' style='width: 600px'>";
table += "<thead><tr> <th>Option</th> <th>Value</th></tr></thead><tbody>";
for (var key in data['config']) {
if (key.indexOf(":") > 0) {
continue;
}
- table += "<tr><td>" + key + "</td><td>" + data['config'][key] + "</td></tr>";
+ table += "<tr><td width=100%>" + data['configdesc'][key] + "</td><td>" + data['config'][key] + "</td></tr>";
}
table += "</table>";
table += "<h4>Module Settings</h4>";
@@ -97,7 +97,7 @@ Loading...
for (var key in data['config']) {
if (key.indexOf(":") > 0) {
bits = key.split(":");
- table += "<tr><td>" + bits[0] + "</td><td>" + bits[1] + "</td><td>" + data['config'][key] + "</td></tr>";
+ table += "<tr><td>" + bits[0] + "</td><td>" + data['configdesc'][key] + "</td><td>" + data['config'][key] + "</td></tr>";
}
}
table += "</table></div>";
diff --git a/sf.py b/sf.py
index 38229f86..37743edb 100755
--- a/sf.py
+++ b/sf.py
@@ -36,7 +36,9 @@ sfConfig = {
sfOptdescs = {
'_debug': "Enable debugging?",
'_useragent': "Default User-Agent string to use for HTTP requests. Can be overridden by individual modules.",
- '_fetchtimeout': "Number of seconds before giving up on a HTTP request."
+ '_fetchtimeout': "Number of seconds before giving up on a HTTP request.",
+ '_modulesenabled': "Modules enabled for the scan." # This is a hack to get a description for
+ # an option not actually available.
}
if __name__ == '__main__':
diff --git a/sfwebui.py b/sfwebui.py
index db74a553..2c8cfc1a 100644
--- a/sfwebui.py
+++ b/sfwebui.py
@@ -177,6 +177,20 @@ class SpiderFootWebUi:
ret = dict()
dbh = SpiderFootDb(self.config)
ret['config'] = dbh.scanConfigGet(id)
+ ret['configdesc'] = dict()
+ for key in ret['config'].keys():
+ if ':' not in key:
+ ret['configdesc'][key] = self.config['__globaloptdescs__'][key]
+ else:
+ [ modName, modOpt ] = key.split(':')
+ if not modName in self.config['__modules__'].keys():
+ continue
+
+ if not modOpt in self.config['__modules__'][modName]['optdescs'].keys():
+ continue
+
+ ret['configdesc'][key] = self.config['__modules__'][modName]['optdescs'][modOpt]
+
sf = SpiderFoot(self.config)
meta = dbh.scanInstanceGet(id)
if meta[3] != 0: