$dir = Join-Path ([Environment]::GetFolderPath("Desktop")) "LR4"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
$path = Join-Path $dir "passwords_1000.txt"
$random = [System.Random]::new(2026)
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%&?".ToCharArray()
$seen = [System.Collections.Generic.HashSet[string]]::new()
$list = [System.Collections.Generic.List[string]]::new()
# Known passwords
$known = @("A7b!", "C4d?", "P7d!")
foreach ($p in $known) {
[void]$seen.Add($p)
$list.Add($p)
}
# Generate 997 additional passwords
while ($list.Count -lt 1000) {
$pass = -join (1..4 | ForEach-Object {
$chars[$random.Next($chars.Length)]
})
if ($seen.Add($pass)) {
$list.Add($pass)
}
}
# Shuffle dictionary
for ($i = $list.Count - 1; $i -gt 0; $i--) {
$j = $random.Next($i + 1)
$temp = $list[$i]
$list[$i] = $list[$j]
$list[$j] = $temp
}
$list | Set-Content -Path $path -Encoding ASCII
Write-Host "SUCCESS!" -ForegroundColor Green
Write-Host "Dictionary: $path"
Write-Host "Total passwords: $($list.Count)"
foreach ($p in $known) {
Write-Host "$p - position $($list.IndexOf($p) + 1)"
}
explorer.exe $dir