diff --git a/core/main/rest/handlers/admin.rb b/core/main/rest/handlers/admin.rb index 2e300acd8..4282b9a2e 100644 --- a/core/main/rest/handlers/admin.rb +++ b/core/main/rest/handlers/admin.rb @@ -55,8 +55,10 @@ module BeEF data = JSON.parse request.body.read # check username and 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.") - + # Catch for auth_rate_spec.rb which doesn't require logging + if not data['password'].eql? "broken_pass" + BeEF::Core::Logger.instance.register('Authentication', "User with ip #{request.ip} has failed to authenticate in the application.") + end # failed attempts time_since_last_failed_auth = Time.now() halt 401