Moved BeEF credentials from admin_ui extension to the main config.yaml. Updated both admin_ui and RESTful API to reflect the changes.

This commit is contained in:
antisnatchor
2012-04-15 10:53:08 +01:00
parent 49af6ad443
commit 364575592a
4 changed files with 10 additions and 8 deletions

View File

@@ -54,7 +54,7 @@ module BeEF
begin
data = JSON.parse request.body.read
# check username and password
if not (data['username'].eql? config.get('beef.extension.admin_ui.username') and data['password'].eql? config.get('beef.extension.admin_ui.password') )
if not (data['username'].eql? config.get('beef.credentials.user') and data['password'].eql? config.get('beef.credentials.passwd') )
BeEF::Core::Logger.instance.register('Authentication', "User with ip #{request.ip} has failed to authenticate in the application.")
halt 401
else