From 04b3bee8cf3f628e6a321271540ff1285a25418f Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Sat, 11 Oct 2014 05:29:30 +0000 Subject: [PATCH] Fix get_hb_details --- core/main/rest/handlers/hookedbrowsers.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/main/rest/handlers/hookedbrowsers.rb b/core/main/rest/handlers/hookedbrowsers.rb index 4b95913e9..9bc703a34 100644 --- a/core/main/rest/handlers/hookedbrowsers.rb +++ b/core/main/rest/handlers/hookedbrowsers.rb @@ -95,17 +95,18 @@ module BeEF end def get_hb_details(hb) + details = BeEF::Core::Models::BrowserDetails { - 'id' => hb.id, - 'session' => hb.session, - 'name' => details.get(hb.session, 'BrowserName'), - 'version' => details.get(hb.session, 'BrowserVersion'), - 'os' => details.get(hb.session, 'OsName'), + 'id' => hb.id, + 'session' => hb.session, + 'name' => details.get(hb.session, 'BrowserName'), + 'version' => details.get(hb.session, 'BrowserVersion'), + 'os' => details.get(hb.session, 'OsName'), 'platform' => details.get(hb.session, 'BrowserPlatform'), - 'ip' => hb.ip, - 'domain' => details.get(hb.session, 'HostName'), - 'port' => hb.port.to_s, + 'ip' => hb.ip, + 'domain' => details.get(hb.session, 'HostName'), + 'port' => hb.port.to_s, 'page_uri' => details.get(hb.session, 'PageURI') } end