Skip to content

Commit 620f420

Browse files
committed
Fix veeam output
1 parent dbd20cb commit 620f420

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

nxc/modules/veeam.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def printCreds(self, context, output):
142142
context.log.fail("Access denied! This is probably due to an AntiVirus software blocking the execution of the PowerShell script.")
143143

144144
# Stripping whitespaces and newlines
145-
output_stripped = [" ".join(line.split()) for line in output.split("\r\n") if line.strip()]
145+
output_stripped = [line for line in output.replace("\r", "").split("\n") if line.strip()]
146146

147147
# Error handling
148148
if "Can't connect to DB! Exiting..." in output_stripped or "No passwords found!" in output_stripped:
@@ -154,7 +154,8 @@ def printCreds(self, context, output):
154154
try:
155155
for account in output_stripped:
156156
user, password = account.split(" ", 1)
157-
password = password.replace("WHITESPACE_ERROR", " ")
157+
password = password.strip().replace("WHITESPACE_ERROR", " ")
158+
user = user.strip()
158159
context.log.highlight(f"{user}:{password}")
159160
if " " in password:
160161
context.log.fail(f'Password contains whitespaces! The password for user "{user}" is: "{password}"')

0 commit comments

Comments
 (0)