Agent: Log MSSQL error when authentication fails

This commit is contained in:
Mike Salvatore 2022-05-03 08:22:53 -04:00
parent 2d685ef44a
commit 17db25b00b
1 changed files with 2 additions and 1 deletions

View File

@ -242,7 +242,8 @@ class MSSQLExploiter(HostExploiter):
self.report_login_attempt(True, user, password)
cursor = conn.cursor()
return cursor
except pymssql.OperationalError:
except pymssql.OperationalError as err:
logger.info(f"Connection to MSSQL failed: {err}")
self.report_login_attempt(False, user, password)
# Combo didn't work, hopping to the next one
pass