Skip to content

Commit f3b73ff

Browse files
fix(mssql): check if output isnt an empty list/None before trying to stringify it for output
1 parent b0e9fe2 commit f3b73ff

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

nxc/protocols/mssql.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,10 @@ def execute(self, payload=None, get_output=False):
318318
return False
319319
else:
320320
self.logger.success("Executed command via mssqlexec")
321-
output_lines = StringIO(output).readlines()
322-
for line in output_lines:
323-
self.logger.highlight(line.strip())
321+
if output:
322+
output_lines = StringIO(output).readlines()
323+
for line in output_lines:
324+
self.logger.highlight(line.strip())
324325
return output
325326

326327
@requires_admin

0 commit comments

Comments
 (0)