From 289988654316bdade5bf0f55978a04d522acf1d5 Mon Sep 17 00:00:00 2001 From: antisnatchor Date: Fri, 3 Jan 2014 11:52:00 +0000 Subject: [PATCH] Added more client-side debugging/logging features to better trace errors when a module fails. --- config.yaml | 7 +++---- core/main/client/updater.js | 3 +++ core/main/server.rb | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/config.yaml b/config.yaml index 628be806e..b31adff7b 100644 --- a/config.yaml +++ b/config.yaml @@ -7,7 +7,10 @@ beef: version: '0.4.4.9-alpha' + # More verbose messages (server-side) debug: false + # More verbose messages (client-side) + client_debug: false restrictions: # subnet of browser ip addresses that can hook to the framework @@ -100,10 +103,6 @@ beef: crypto_default_value_length: 80 - # Enable client-side debugging - client: - debug: false - # You may override default extension configuration parameters here extension: requester: diff --git a/core/main/client/updater.js b/core/main/client/updater.js index 80518c184..cf97de41c 100644 --- a/core/main/client/updater.js +++ b/core/main/client/updater.js @@ -81,6 +81,9 @@ beef.updater = { command(); } catch(e) { console.error('execute_commands - command failed to execute: ' + e.message); + // prints the command source to be executed, to better trace errors + // beef.client_debug must be enabled in the main config + beef.debug(command.toString()); } } this.lock = false; diff --git a/core/main/server.rb b/core/main/server.rb index 5e743eb36..b4530ad07 100644 --- a/core/main/server.rb +++ b/core/main/server.rb @@ -46,7 +46,7 @@ module BeEF 'beef_dns_port' => @configuration.get('beef.http.dns_port'), 'beef_hook' => @configuration.get('beef.http.hook_file'), 'beef_proto' => @configuration.get('beef.http.https.enable') == true ? "https" : "http", - 'client_debug' => @configuration.get("beef.client.debug") + 'client_debug' => @configuration.get("beef.client_debug") } end