Clean output of mssql protocol

main
mpgn 2020-04-28 09:39:33 -04:00
parent f19f137b0d
commit 1bbe1ac0cc
1 changed files with 4 additions and 2 deletions

View File

@ -214,7 +214,8 @@ class mssql(connection):
self.conn.sql_query(self.args.mssql_query)
self.conn.printRows()
for line in StringIO(self.conn._MSSQL__rowsPrinter.getMessage()).readlines():
self.logger.highlight(line.strip())
if line.strip() != '':
self.logger.highlight(line.strip())
return self.conn._MSSQL__rowsPrinter.getMessage()
@requires_admin
@ -237,7 +238,8 @@ class mssql(connection):
self.logger.success('Executed command via mssqlexec')
buf = StringIO(output).readlines()
for line in buf:
self.logger.highlight(line.strip())
if line.strip() != '':
self.logger.highlight(line.strip())
return output