Issue 654: the RESTful api classes are now extending the Router class

This commit is contained in:
antisnatchor
2012-04-09 11:16:21 +01:00
parent 8cac63a2f0
commit 22772c7822
3 changed files with 3 additions and 9 deletions

View File

@@ -17,11 +17,9 @@
module BeEF
module Core
module Rest
class HookedBrowsers < Sinatra::Base
class HookedBrowsers < BeEF::Core::Router::Router
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')

View File

@@ -17,11 +17,9 @@
module BeEF
module Core
module Rest
class Logs < Sinatra::Base
class Logs < BeEF::Core::Router::Router
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')

View File

@@ -17,11 +17,9 @@
module BeEF
module Core
module Rest
class Modules < Sinatra::Base
class Modules < BeEF::Core::Router::Router
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')