diff options
Diffstat (limited to 'Privesc/Get-SiteListPassword.ps1')
-rw-r--r-- | Privesc/Get-SiteListPassword.ps1 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Privesc/Get-SiteListPassword.ps1 b/Privesc/Get-SiteListPassword.ps1 index a37f63c..f631872 100644 --- a/Privesc/Get-SiteListPassword.ps1 +++ b/Privesc/Get-SiteListPassword.ps1 @@ -128,8 +128,13 @@ function Get-SiteListPassword { try { $PasswordRaw = $_.Password.'#Text' - # decrypt the base64 password - $DecPassword = if($PasswordRaw) { (Get-DecryptedSitelistPassword -B64Pass $PasswordRaw).Decrypted } else {''} + if($_.Password.Encrypted -eq 1) { + # decrypt the base64 password if it's marked as encrypted + $DecPassword = if($PasswordRaw) { (Get-DecryptedSitelistPassword -B64Pass $PasswordRaw).Decrypted } else {''} + } + else { + $DecPassword = $PasswordRaw + } $Server = if($_.ServerIP) { $_.ServerIP } else { $_.Server } $Path = if($_.ShareName) { $_.ShareName } else { $_.RelativePath } |