From ad908e18132dd48c354327131f57e2808e5e2712 Mon Sep 17 00:00:00 2001 From: aaron Date: Fri, 3 Apr 2020 15:42:16 +1000 Subject: [PATCH] Split on config --- config.yaml | 3 --- core/main/handlers/hookedbrowsers.rb | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config.yaml b/config.yaml index 9089a6cf5..269bb7bac 100644 --- a/config.yaml +++ b/config.yaml @@ -14,9 +14,6 @@ beef: # Used for generating secure tokens crypto_default_value_length: 80 - # Testif variable - testif: true - # Credentials to authenticate in BeEF. # Used by both the RESTful API and the Admin interface credentials: diff --git a/core/main/handlers/hookedbrowsers.rb b/core/main/handlers/hookedbrowsers.rb index 22178904a..ee1511221 100644 --- a/core/main/handlers/hookedbrowsers.rb +++ b/core/main/handlers/hookedbrowsers.rb @@ -62,7 +62,9 @@ module Handlers # @note generate the instructions to hook the browser host_name = request.host (print_error "Invalid host name";return) if not BeEF::Filters.is_valid_hostname?(host_name) - if config.get("beef.testif") + + # Generate the hook js provided to the hookwed browser (the magic happens here) + if BeEF::Core::Configuration.instance.get("beef.http.websocket.enable") build_beefjs!(host_name) else legacy_build_beefjs!(host_name)