From d8bfa76dca7d9e2bdcd3264cea30af674a25c0f3 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Wed, 20 Oct 2010 22:12:53 +0000 Subject: [PATCH] Minor possible bug fix --- lib/core/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 7d4080b9a..257e4d3de 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -582,7 +582,7 @@ def parsePasswordHash(password): if not password or password == " ": password = "NULL" - if kb.dbms == "Microsoft SQL Server" and password != "NULL": + if kb.dbms == "Microsoft SQL Server" and password != "NULL" and isHexEncodedString(password): hexPassword = password password = "%s\n" % hexPassword password += "%sheader: %s\n" % (blank, hexPassword[:6]) @@ -1209,7 +1209,7 @@ def isHexEncodedString(subject): False """ - return re.match(r"\A[0-9a-fA-F]+\Z", subject) is not None + return re.match(r"\A[0-9a-fA-Fx]+\Z", subject) is not None def getConsoleWidth(default=80): width = None