Skip to content

Commit 2235050

Browse files
authored
Merge pull request Pennyw0rth#487 from Pennyw0rth/neff-fix-veeam-output
Fix veeam output
2 parents dbd20cb + 3fff8b1 commit 2235050

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
---
2-
name: Pull request
3-
about: Update code to fix a bug or add an enhancement/feature
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
8-
---
91
## Description
102

113
Please include a summary of the change and which issue is fixed, or what the enhancement does.

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)