Commenting GBs hookedbrowserwebsockettimeout fix

This commit is contained in:
aaron
2020-04-02 15:22:33 +10:00
parent 24ee0c5095
commit 53b283b71d

View File

@@ -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)))