From 53b283b71d41da0d4903e841c001342e4a97891b Mon Sep 17 00:00:00 2001 From: aaron Date: Thu, 2 Apr 2020 15:22:33 +1000 Subject: [PATCH] Commenting GBs hookedbrowserwebsockettimeout fix --- core/main/rest/handlers/hookedbrowsers.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/main/rest/handlers/hookedbrowsers.rb b/core/main/rest/handlers/hookedbrowsers.rb index c4f7c8a50..9c2add985 100644 --- a/core/main/rest/handlers/hookedbrowsers.rb +++ b/core/main/rest/handlers/hookedbrowsers.rb @@ -27,6 +27,8 @@ module BeEF if config.get('beef.http.websocket.enable') == false online_hooks = hb_to_json(BeEF::Core::Models::HookedBrowser.where('lastseen >= ?', (Time.new.to_i - 15))) offline_hooks = hb_to_json(BeEF::Core::Models::HookedBrowser.where('lastseen <= ?', (Time.new.to_i - 15))) + # If we're using websockets use the designated threshold timeout to determine live, instead of hardcoded 15 + # Why is it hardcoded 15? else timeout = config.get('beef.http.websocket.ws_poll_timeout') online_hooks = hb_to_json(BeEF::Core::Models::HookedBrowser.where('lastseen >= ?', (Time.new.to_i - timeout)))