From e3a20adeb071167e6e9698eb4478e1015251722c Mon Sep 17 00:00:00 2001 From: antisnatchor Date: Mon, 27 Jul 2015 13:29:47 +0200 Subject: [PATCH] Re-added config object --- core/main/rest/handlers/autorun_engine.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/main/rest/handlers/autorun_engine.rb b/core/main/rest/handlers/autorun_engine.rb index 9bfb6a035..8e15b5dee 100644 --- a/core/main/rest/handlers/autorun_engine.rb +++ b/core/main/rest/handlers/autorun_engine.rb @@ -9,6 +9,8 @@ module BeEF module Rest class AutorunEngine < BeEF::Core::Router::Router + config = BeEF::Core::Configuration.instance + before do error 401 unless params[:token] == config.get('beef.api_token') halt 401 if not BeEF::Core::Rest.permitted_source?(request.ip)