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)