Agent: Remove unnecessary `pass` from MSSQLExploiter

This commit is contained in:
Mike Salvatore 2022-10-07 08:43:05 -04:00
parent ec617df06a
commit a558948c5d
1 changed files with 1 additions and 2 deletions

View File

@ -144,13 +144,12 @@ class MSSQLExploiter(HostExploiter):
self.add_vuln_port(MSSQLExploiter.SQL_DEFAULT_TCP_PORT) self.add_vuln_port(MSSQLExploiter.SQL_DEFAULT_TCP_PORT)
self._report_login_attempt(timestamp, True, user, password) self._report_login_attempt(timestamp, True, user, password)
cursor = conn.cursor() cursor = conn.cursor()
return cursor return cursor
except pymssql.OperationalError as err: except pymssql.OperationalError as err:
error_message = f"Connection to MSSQL failed: {err}" error_message = f"Connection to MSSQL failed: {err}"
logger.info(error_message) logger.info(error_message)
self._report_login_attempt(timestamp, False, user, password, error_message) self._report_login_attempt(timestamp, False, user, password, error_message)
# Combo didn't work, hopping to the next one
pass
logger.warning( logger.warning(
"No user/password combo was able to connect to host: {0}:{1}, " "No user/password combo was able to connect to host: {0}:{1}, "