From 8fdd127f179946463f27ab8c747fa8f54b40c76e Mon Sep 17 00:00:00 2001 From: antisnatchor Date: Wed, 14 Mar 2012 16:26:29 +0100 Subject: [PATCH] Disabled Sinatra exception, and set the custom 404 response to 'not found.' --- core/main/rest/handlers/hookedbrowsers.rb | 2 ++ core/main/rest/handlers/logs.rb | 2 ++ core/main/rest/handlers/modules.rb | 2 ++ 3 files changed, 6 insertions(+) diff --git a/core/main/rest/handlers/hookedbrowsers.rb b/core/main/rest/handlers/hookedbrowsers.rb index 6f5106cfa..b56fffbe4 100644 --- a/core/main/rest/handlers/hookedbrowsers.rb +++ b/core/main/rest/handlers/hookedbrowsers.rb @@ -20,6 +20,8 @@ module BeEF class HookedBrowsers < Sinatra::Base config = BeEF::Core::Configuration.instance + configure do set :show_exceptions, false end + not_found do 'Not Found.' end before do error 401 unless params[:token] == config.get('beef.api_token') diff --git a/core/main/rest/handlers/logs.rb b/core/main/rest/handlers/logs.rb index d33ff9522..d4ee2bc0d 100644 --- a/core/main/rest/handlers/logs.rb +++ b/core/main/rest/handlers/logs.rb @@ -20,6 +20,8 @@ module BeEF class Logs < Sinatra::Base config = BeEF::Core::Configuration.instance + configure do set :show_exceptions, false end + not_found do 'Not Found.' end before do error 401 unless params[:token] == config.get('beef.api_token') diff --git a/core/main/rest/handlers/modules.rb b/core/main/rest/handlers/modules.rb index 9f9ce4224..3e04494a3 100644 --- a/core/main/rest/handlers/modules.rb +++ b/core/main/rest/handlers/modules.rb @@ -20,6 +20,8 @@ module BeEF class Modules < Sinatra::Base config = BeEF::Core::Configuration.instance + configure do set :show_exceptions, false end + not_found do 'Not Found.' end before do error 401 unless params[:token] == config.get('beef.api_token')