Skip to content

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

Option descriptions.

smicallef386e1dc05cb4
diff --git a/dyn/opts.tmpl b/dyn/opts.tmpl
index 51d40fdf..04b49db0 100644
--- a/dyn/opts.tmpl
+++ b/dyn/opts.tmpl
@@ -28,7 +28,7 @@
<thead><tr> <th>Option</th> <th>Value</th></tr></thead><tbody>
% for opt in sorted(opts.keys()):
% if not opt.startswith("__"):
- <tr><td>${opt}</td><td>
+ <tr><td>${opts['__globaloptdescs__'][opt]}</td><td>
% if type(opts[opt]) is int:
<input id='${opt}' class='input-mini' type=text value="${opts[opt]}">
% endif
@@ -49,10 +49,14 @@
<option value=0 ${selfalse}>False</option>
</select>
% endif
- % if type(opts[opt]) is list:
+ % if type(opts[opt]) is list and type(opts[opt][0]) is str:
<% expandedopt = ','.join(opts[opt]) %>
<input id='${opt}' class='input-xxlarge' type=text value="${expandedopt}">
% endif
+ % if type(opts[opt]) is list and type(opts[opt][0]) is int:
+ <% expandedopt = ','.join(str(x) for x in opts[opt]) %>
+ <input id='${opt}' class='input-xxlarge' type=text value="${expandedopt}">
+ % endif
</td></tr>
% endif
% endfor
@@ -61,12 +65,18 @@
<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>
+<thead><tr> <th>Module</th><th>Option</th> <th>Value</th></tr></thead><tbody>
% for mod in sorted(opts['__modules__'].keys()):
+ <% modopts = opts['__modules__'][mod]['opts'] %>
% for opt in opts['__modules__'][mod]['opts'].keys():
- <% modopts = opts['__modules__'][mod]['opts'] %>
% if not opt.startswith("_"):
- <tr><td>${mod}</td><td>${opt}</td><td>
+ <%
+ if not opts['__modules__'][mod].has_key('optdescs'):
+ optdesc = "No description available."
+ else:
+ optdesc = opts['__modules__'][mod]['optdescs'][opt]
+ %>
+ <tr><td>${mod}</td><td>${optdesc}</td><td>
% if type(modopts[opt]) is int:
<input id='${mod}:${opt}' class='input-mini' type=text value="${modopts[opt]}">
% endif
@@ -87,10 +97,15 @@
<option value=0 ${selfalse}>False</option>
</select>
% endif
- % if type(modopts[opt]) is list:
+ % if type(modopts[opt]) is list and type(modopts[opt][0]) is str:
<% expandedopt = ','.join(modopts[opt]) %>
<input id='${mod}:${opt}' class='input-xxlarge' type=text value="${expandedopt}">
% endif
+ % if type(modopts[opt]) is list and type(modopts[opt][0]) is int:
+ <% expandedopt = ','.join(str(x) for x in modopts[opt]) %>
+ <input id='${mod}:${opt}' class='input-xxlarge' type=text value="${expandedopt}">
+ % endif
+
</td></tr>
% endif
% endfor
@@ -99,7 +114,7 @@
</table>
<div style='text-align: right'>
<input type=hidden id='allopts' name='allopts' value=''>
- <button onClick='clearSettings();' class='btn btn-danger'>Reset to Default</button>
+ <button onClick='clearSettings();' class='btn btn-danger'>Reset to Factory Default</button>
<button onClick='saveSettings();' class='btn btn-primary'>Save Changes</button>
</div>
</form>
diff --git a/dyn/scaninfo.tmpl b/dyn/scaninfo.tmpl
index 3a6e540b..ae45b5ca 100644
--- a/dyn/scaninfo.tmpl
+++ b/dyn/scaninfo.tmpl
@@ -58,7 +58,7 @@ Loading...
var table = "<table id='scansummary-content' class='table table-bordered table-striped small'>";
table += "<thead><tr> <th>Data Element</th><th>Obtained</th><th>Source</th><th>Module</th></tr></thead><tbody>";
for (var i = 0; i < data.length; i++) {
- table += "<tr><td width=75%><pre>" + data[i][1] + "</pre></td><td>" + data[i][0] + "</td><td>" + data[i][2] + "</td><td>" + data[i][3] + "</td></tr>";
+ table += "<tr><td width=50%><pre>" + data[i][1] + "</pre></td><td>" + data[i][0] + "</td><td>" + data[i][2] + "</td><td>" + data[i][3] + "</td></tr>";
}
table += "</tbody></table>"
$("#loader").fadeOut(250);
diff --git a/evtypes.sql b/evtypes.sql
index 249315a2..535faf79 100644
--- a/evtypes.sql
+++ b/evtypes.sql
@@ -4,6 +4,7 @@
INSERT INTO tbl_event_types (event, event_descr) VALUES ('AFFILIATE', 'Affiliate');
INSERT INTO tbl_event_types (event, event_descr) VALUES ('EMAILADDR', 'Email Address');
INSERT INTO tbl_event_types (event, event_descr) VALUES ('GEOINFO', 'Physical Location')
+INSERT INTO tbl_event_types (event, event_descr) VALUES ('HTTP_CODE', 'HTTP Status Code');
INSERT INTO tbl_event_types (event, event_descr) VALUES ('IP_ADDRESS', 'IP Address');
INSERT INTO tbl_event_types (event, event_descr) VALUES ('SUBDOMAIN', 'Sub-domain');
INSERT INTO tbl_event_types (event, event_descr) VALUES ('SIMILARDOMAIN', 'Similar Domain');
diff --git a/modules/sfp_dns.py b/modules/sfp_dns.py
index 15c30ca3..cd49dfd3 100644
--- a/modules/sfp_dns.py
+++ b/modules/sfp_dns.py
@@ -35,8 +35,8 @@ class sfp_dns(SpiderFootPlugin):
# Option descriptions
optdescs = {
- 'resolveaffiliate': "Obtain IPs for confirmed affiliates.",
- 'reverselookup': "Obtain new URLs and more based on reverse-resolved IPs"
+ 'resolveaffiliate': "Obtain IPs for confirmed affiliates?",
+ 'reverselookup': "Obtain new URLs and more based on reverse-resolved IPs?"
}
# URL this instance is working on
diff --git a/modules/sfp_xref.py b/modules/sfp_xref.py
index 70da851c..587c8f85 100644
--- a/modules/sfp_xref.py
+++ b/modules/sfp_xref.py
@@ -35,8 +35,8 @@ class sfp_xref(SpiderFootPlugin):
# Option descriptions
optdescs = {
- "forcebase": "Require the base domain of an external URL for affiliation.",
- "checkbase": "Check the base domain of a URL for affiliation."
+ "forcebase": "Require the base domain of an external URL for affiliation?",
+ "checkbase": "Check the base domain of a URL for affiliation?"
}
# Internal results tracking
diff --git a/sf.py b/sf.py
index e1ee62cb..38229f86 100755
--- a/sf.py
+++ b/sf.py
@@ -25,7 +25,7 @@ sfConfig = {
'__debugfilter': '', # Filter out debug strings
'__blocknotif': False, # Block notifications
'_useragent': 'SpiderFoot/2.0', # User-Agent to use for HTTP requests
- '_fetchtimeout': 1, # number of seconds before giving up on a fetch
+ '_fetchtimeout': 5, # number of seconds before giving up on a fetch
'__database': 'spiderfoot.db',
'__webaddr': '0.0.0.0',
'__webport': 5001,
@@ -33,6 +33,12 @@ sfConfig = {
'__modules__': None # List of modules. Will be set after start-up.
}
+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."
+}
+
if __name__ == '__main__':
sf = SpiderFoot(sfConfig)
sfModules = dict()
@@ -50,7 +56,10 @@ if __name__ == '__main__':
mod = __import__('modules.' + modName, globals(), locals(), [modName])
sfModules[modName]['object'] = getattr(mod, modName)()
sfModules[modName]['descr'] = sfModules[modName]['object'].__doc__
- sfModules[modName]['opts'] = sfModules[modName]['object'].opts
+ if hasattr(sfModules[modName]['object'], 'opts'):
+ sfModules[modName]['opts'] = sfModules[modName]['object'].opts
+ if hasattr(sfModules[modName]['object'], 'optdescs'):
+ sfModules[modName]['optdescs'] = sfModules[modName]['object'].optdescs
if len(sfModules.keys()) < 1:
print "No modules found in the modules directory."
@@ -58,6 +67,8 @@ if __name__ == '__main__':
# Add module info to sfConfig so it can be used by the UI
sfConfig['__modules__'] = sfModules
+ # Add descriptions of the global config options
+ sfConfig['__globaloptdescs__'] = sfOptdescs
# Start the web server so you can start looking at results
print "Starting web server at http://" + sfConfig['__webaddr'] + \
diff --git a/sfdbsetup.py b/sfdbsetup.py
index f1c8b675..a19db11f 100644
--- a/sfdbsetup.py
+++ b/sfdbsetup.py
@@ -70,6 +70,7 @@ class SpiderFootDbInit:
"INSERT INTO tbl_event_types (event, event_descr) VALUES ('AFFILIATE', 'Affiliate')",
"INSERT INTO tbl_event_types (event, event_descr) VALUES ('EMAILADDR', 'Email Address')",
"INSERT INTO tbl_event_types (event, event_descr) VALUES ('GEOINFO', 'Physical Location')",
+ "INSERT INTO tbl_event_types (event, event_descr) VALUES ('HTTP_CODE', 'HTTP Status Code')",
"INSERT INTO tbl_event_types (event, event_descr) VALUES ('IP_ADDRESS', 'IP Address')",
"INSERT INTO tbl_event_types (event, event_descr) VALUES ('SUBDOMAIN', 'Sub-domain')",
"INSERT INTO tbl_event_types (event, event_descr) VALUES ('SIMILARDOMAIN', 'Similar Domain')",
diff --git a/sfwebui.py b/sfwebui.py
index b997380c..db74a553 100644
--- a/sfwebui.py
+++ b/sfwebui.py
@@ -298,7 +298,7 @@ class SpiderFootWebUi:
# Initiate a scan
def startscan(self, scanname, scantarget, modulelist):
- modopts = dict()
+ modopts = dict() # Not used yet as module options are set globally
if scanname == "" or scantarget == "" or modulelist == "":
return self.error("Form incomplete.")