only write passwords

This commit is contained in:
Audrey Aaliyah Jensen 2023-08-25 12:08:55 -05:00
parent 1665d6b748
commit 12f647835e

View File

@ -11,7 +11,6 @@ $pwPattern = [regex] "[A-z 0-9 \-]{1,251}\((?<PW>[A-z0-9]{1,251})\)\.zip";
$files = Get-ChildItem;
$passwords = [Regex]::Matches($files, $pwPattern);
$passwords.groups.Value | ForEach-Object {Write-Output $_ }
Get-ChildItem | Where-Object { $_.name -match $pwPattern} | ForEach-Object {Write-Output $_.group }
$passwords.groups | Where-Object {$_.Name -match "PW"} | ForEach-Object {Write-Output $_.Value }
Write-Output Done;