From 2a03c655199858729d2b45ad8847396dec35bc22 Mon Sep 17 00:00:00 2001 From: henri Date: Mon, 6 May 2013 21:11:44 +0000 Subject: [PATCH] Fixes (tested against redis v2.9.9) --- scripts/redis-info.nse | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/redis-info.nse b/scripts/redis-info.nse index d3f56c482..16643b759 100644 --- a/scripts/redis-info.nse +++ b/scripts/redis-info.nse @@ -86,7 +86,8 @@ action = function(host, port) helper:close() if ( redis.Response.Type.ERROR == response.type ) then - if ( "-ERR operation not permitted" == response.data ) then + if ( "-ERR operation not permitted" == response.data ) or + ( "-NOAUTH Authentication required." == response.data ) then return fail("Authentication required") end return fail(response.data) @@ -100,7 +101,9 @@ action = function(host, port) local kvs = {} for _, item in ipairs(restab) do local k, v = item:match("^([^:]*):(.*)$") - kvs[k] = v + if k ~= nil then + kvs[k] = v + end end local result = tab.new(2)