Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit 261aaf6

Browse files
committed
Update Get-GPPPassword.ps1
Bug fix of variables.
1 parent 24fc1b6 commit 261aaf6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Exfiltration/Get-GPPPassword.ps1

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function Get-GPPPassword {
99
License: BSD 3-Clause
1010
Required Dependencies: None
1111
Optional Dependencies: None
12-
Version: 2.3.0
12+
Version: 2.3.1
1313
1414
.DESCRIPTION
1515
@@ -124,10 +124,10 @@ function Get-GPPPassword {
124124
If (!($Count)) {$Count = 1}
125125
ForEach ($Number in 0..($Count - 1)){
126126
If ($Count -eq 1) {$Replace = 'User'} else {$Replace = "User[$Number]"}
127-
$Cpassword += , $Xml.Groups.User[$Number].Properties.cpassword
128-
$UserName += , $Xml.Groups.User[$Number].Properties.userName
129-
$NewName += , $Xml.Groups.User[$Number].Properties.newName
130-
$Changed += , $Xml.Groups.User[$Number].changed
127+
$Cpassword += , $Xml.Groups.User.$Replace.Properties.cpassword
128+
$UserName += , $Xml.Groups.User.$Replace.Properties.userName
129+
$NewName += , $Xml.Groups.User.$Replace.Properties.newName
130+
$Changed += , $Xml.Groups.User.$Replace.changed
131131
}
132132
}
133133

@@ -136,9 +136,9 @@ function Get-GPPPassword {
136136
If (!($Count)) {$Count = 1}
137137
ForEach ($Number in 0..($Count - 1)){
138138
If ($Count -eq 1) {$Replace = 'NTService'} else {$Replace = "NTService[$Number]"}
139-
$Cpassword += , $Xml.NTServices.NTService[$Number].Properties.cpassword
140-
$UserName += , $Xml.NTServices.NTService[$Number].Properties.accountName
141-
$Changed += , $Xml.NTServices.NTService[$Number].changed
139+
$Cpassword += , $Xml.NTServices.NTService.$Replace.Properties.cpassword
140+
$UserName += , $Xml.NTServices.NTService.$Replace.Properties.accountName
141+
$Changed += , $Xml.NTServices.NTService.$Replace.changed
142142
}
143143
}
144144

@@ -147,9 +147,9 @@ function Get-GPPPassword {
147147
If (!($Count)) {$Count = 1}
148148
ForEach ($Number in 0..($Count - 1)){
149149
If ($Count -eq 1) {$Replace = 'Task'} else {$Replace = "Task[$Number]"}
150-
$Cpassword += , $Xml.ScheduledTasks.Task[$Number].Properties.cpassword
151-
$UserName += , $Xml.ScheduledTasks.Task[$Number].Properties.runAs
152-
$Changed += , $Xml.ScheduledTasks.Task[$Number].changed
150+
$Cpassword += , $Xml.ScheduledTasks.Task.$Replace.Properties.cpassword
151+
$UserName += , $Xml.ScheduledTasks.Task.$Replace.Properties.runAs
152+
$Changed += , $Xml.ScheduledTasks.Task.$Replace.changed
153153
}
154154
}
155155

@@ -217,4 +217,4 @@ function Get-GPPPassword {
217217
}
218218

219219
catch {Write-Error $Error[0]}
220-
}
220+
}

0 commit comments

Comments
 (0)