lists passwords to console
This commit is contained in:
parent
239a792bf0
commit
38c5b2f96b
@ -1,10 +1,17 @@
|
|||||||
# Copy Extract.py and *.zip to the desktop.
|
|
||||||
# Regex the password from the zip's filename. Copy to var
|
# Regex the password from the zip's filename. Copy to var
|
||||||
# Open 7zip, extract to desktop, input password.
|
# Open 7zip, extract to desktop, input password.
|
||||||
# take all *.eml and make .mht copies.
|
# take all *.eml and make .mht copies.
|
||||||
|
|
||||||
|
#Copy items to desktop
|
||||||
Copy-Item './extract.py' '..';
|
Copy-Item './extract.py' '..';
|
||||||
|
|
||||||
Get-ChildItem | Where-Object { $_.name -match '\.zip'} | ForEach-Object {Write-Output $_.name; Copy-Item -Path $_.name -Destination '..' }
|
Get-ChildItem | Where-Object { $_.name -match '\.zip'} | ForEach-Object {Write-Output $_.name; Copy-Item -Path $_.name -Destination '..' }
|
||||||
|
|
||||||
|
#Capture zip password from filename
|
||||||
|
$pwPattern = [regex] "[A-z 0-9 \-]{1,251}\((?<PW>[A-z0-9]{1,251})\)\.zip";
|
||||||
|
|
||||||
|
$files = Get-ChildItem;
|
||||||
|
$passwords = [Regex]::Matches($files, $pwPattern);
|
||||||
|
Write-Output $passwords.groups.Value[1]
|
||||||
|
Get-ChildItem | Where-Object { $_.name -match $pwPattern} | ForEach-Object {Write-Output $_.group }
|
||||||
|
|
||||||
Write-Output Done;
|
Write-Output Done;
|
||||||
Loading…
x
Reference in New Issue
Block a user