Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d8bfa76

Browse files
committed
Minor possible bug fix
1 parent e73e060 commit d8bfa76

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/core/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ def parsePasswordHash(password):
582582
if not password or password == " ":
583583
password = "NULL"
584584

585-
if kb.dbms == "Microsoft SQL Server" and password != "NULL":
585+
if kb.dbms == "Microsoft SQL Server" and password != "NULL" and isHexEncodedString(password):
586586
hexPassword = password
587587
password = "%s\n" % hexPassword
588588
password += "%sheader: %s\n" % (blank, hexPassword[:6])
@@ -1209,7 +1209,7 @@ def isHexEncodedString(subject):
12091209
False
12101210
"""
12111211

1212-
return re.match(r"\A[0-9a-fA-F]+\Z", subject) is not None
1212+
return re.match(r"\A[0-9a-fA-Fx]+\Z", subject) is not None
12131213

12141214
def getConsoleWidth(default=80):
12151215
width = None

0 commit comments

Comments
 (0)