Add jQuery BlockUI plugin to hook
This commit is contained in:
19
modules/misc/blockui/command.js
Normal file
19
modules/misc/blockui/command.js
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Copyright (c) 2006-2015 Wade Alcorn - wade@bindshell.net
|
||||
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
// See the file 'doc/COPYING' for copying permission
|
||||
//
|
||||
|
||||
beef.execute(function() {
|
||||
var timeout = '<%= @timeout %>' * 1000;
|
||||
|
||||
var blockui = function() {
|
||||
$j.blockUI({ message: '<%= @message.gsub(/'/, "\\\'") %>' });
|
||||
setTimeout("$j.unblockUI();", <%= @timeout %> * 1000);
|
||||
}
|
||||
|
||||
blockui();
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=command sent');
|
||||
|
||||
});
|
||||
|
||||
15
modules/misc/blockui/config.yaml
Normal file
15
modules/misc/blockui/config.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Copyright (c) 2006-2015 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
beef:
|
||||
module:
|
||||
blockui:
|
||||
enable: true
|
||||
category: "Misc"
|
||||
name: "BlockUI Modal Dialog"
|
||||
description: "This module uses jQuery <a href='https://github.com/malsup/blockui/'>BlockUI</a> to block the window and display a message."
|
||||
authors: ["bcoles"]
|
||||
target:
|
||||
user_notify: ["ALL"]
|
||||
21
modules/misc/blockui/module.rb
Normal file
21
modules/misc/blockui/module.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# Copyright (c) 2006-2015 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
class Blockui < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
return [
|
||||
{'name' => 'message', 'ui_label' => 'Message', 'type' => 'textarea', 'value' => '<p>Please wait while your data is being saved...</p>', 'width' => '400px', 'height' => '100px' },
|
||||
{'name' => 'timeout', 'ui_label' => 'Timeout (s)', 'value' => '30', 'width' => '400px' }
|
||||
]
|
||||
end
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
11
modules/misc/unblockui/command.js
Normal file
11
modules/misc/unblockui/command.js
Normal file
@@ -0,0 +1,11 @@
|
||||
//
|
||||
// Copyright (c) 2006-2015 Wade Alcorn - wade@bindshell.net
|
||||
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
// See the file 'doc/COPYING' for copying permission
|
||||
//
|
||||
|
||||
beef.execute(function() {
|
||||
$j.unblockUI();
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=command sent');
|
||||
});
|
||||
|
||||
15
modules/misc/unblockui/config.yaml
Normal file
15
modules/misc/unblockui/config.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Copyright (c) 2006-2015 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
beef:
|
||||
module:
|
||||
unblockui:
|
||||
enable: true
|
||||
category: "Misc"
|
||||
name: "UnBlockUI"
|
||||
description: "This module removes all jQuery BlockUI dialogs."
|
||||
authors: ["bcoles"]
|
||||
target:
|
||||
user_notify: ["ALL"]
|
||||
14
modules/misc/unblockui/module.rb
Normal file
14
modules/misc/unblockui/module.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# Copyright (c) 2006-2015 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
class Unblockui < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user