fix bug and adding feature to retrieve browser plugins during the init.js
git-svn-id: https://beef.googlecode.com/svn/trunk@546 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
@@ -55,6 +55,15 @@ module BeEF
|
||||
raise WEBrick::HTTPStatus::BadRequest, "Invalid host name" if not Filter.is_valid_hostname?(host_name)
|
||||
BD.set(session_id, 'HostName', host_name)
|
||||
|
||||
# get and store the browser plugins
|
||||
browser_plugins = get_param(request.query, 'BrowserPlugins')
|
||||
if not browser_plugins.nil?
|
||||
#TODO: add filters
|
||||
#raise WEBrick::HTTPStatus::BadRequest, "Invalid browser plugins: has non printable chars" if not Filter.has_non_printable_char?(browser_plugins)
|
||||
#raise WEBrick::HTTPStatus::BadRequest, "Invalid browser plugins: has null chars" if not Filter.has_null?(browser_plugins)
|
||||
BD.set(session_id, 'BrowserPlugins', browser_plugins)
|
||||
end
|
||||
|
||||
# get and store the internal ip address
|
||||
internal_ip = get_param(request.query, 'InternalIP')
|
||||
if not internal_ip.nil?
|
||||
|
||||
@@ -93,9 +93,24 @@ class Modules < BeEF::HttpController
|
||||
|
||||
summary_grid_hash['results'].push(browser_version_row) # add the row
|
||||
|
||||
# set and add teh internal ip address
|
||||
# set and add the list of plugins installed in the browser
|
||||
browser_plugins = BD.get(zombie_session, 'BrowserPlugins')
|
||||
if not browser_plugins.nil? and not browser_plugins.empty?
|
||||
encoded_browser_plugins = CGI.escapeHTML(browser_plugins)
|
||||
encoded_browser_plugins_hash = { 'Browser Plugins' => encoded_browser_plugins }
|
||||
|
||||
page_name_row = {
|
||||
'category' => 'Browser Hook Initialisation',
|
||||
'data' => encoded_browser_plugins_hash,
|
||||
'from' => 'Initialisation'
|
||||
}
|
||||
|
||||
summary_grid_hash['results'].push(page_name_row) # add the row
|
||||
end
|
||||
|
||||
# set and add the internal ip address
|
||||
internal_ip = BD.get(zombie_session, 'InternalIP')
|
||||
if internal_ip
|
||||
if not internal_ip.nil?
|
||||
encoded_internal_ip = CGI.escapeHTML(internal_ip)
|
||||
encoded_internal_ip_hash = { 'Internal IP' => encoded_internal_ip }
|
||||
|
||||
@@ -108,9 +123,9 @@ class Modules < BeEF::HttpController
|
||||
summary_grid_hash['results'].push(page_name_row) # add the row
|
||||
end
|
||||
|
||||
# set and add teh internal hostname
|
||||
# set and add the internal hostname
|
||||
internal_hostname = BD.get(zombie_session, 'InternalHostname')
|
||||
if internal_ip
|
||||
if not internal_hostname.nil?
|
||||
encoded_internal_hostname = CGI.escapeHTML(internal_hostname)
|
||||
encoded_internal_hostname_hash = { 'Internal Hostname' => encoded_internal_hostname }
|
||||
|
||||
|
||||
@@ -327,6 +327,7 @@ beef.browser = {
|
||||
details["BrowserReportedName"] = beef.browser.getBrowserReportedName();
|
||||
details["PageTitle"] = document.title;
|
||||
details["HostName"] = document.location.hostname;
|
||||
details["BrowserPlugins"] = beef.browser.getPlugins();
|
||||
|
||||
return details;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user