Skip to content

Commit 9d90e0d

Browse files
committed
fix: avoid AttributeError when MSSQL command output is None
1 parent 08ad1cc commit 9d90e0d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nxc/protocols/mssql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def execute(self, payload=None, get_output=False):
323323
self.logger.fail(f"Error during command execution: {self.conn.lastError}")
324324
else:
325325
self.logger.success("Executed command via mssqlexec")
326-
for line in output.splitlines():
326+
for line in (output or "").splitlines():
327327
self.logger.highlight(line.strip())
328328
return output
329329

0 commit comments

Comments
 (0)