Discover our powerful Password Generator Tool to create strong, unique passwords instantly. Enhance your online security with customizable options for length, complexity, and character types. Generate secure passwords for all your accounts effortlessly and protect your sensitive information from cyber threats. Try our user-friendly password generator now and stay safe online!

Tag Archive for: Password Generator Tool

Advanced Password Generator Tool

<#
.SYNOPSIS
Advanced Password Generator Tool

.DESCRIPTION
This script provides an advanced password generation tool with features including
customizable generation criteria, password strength evaluation, password history,
and additional utility functions.

.NOTES
File Name      : AdvancedPasswordGenerator.ps1
Author         : [Your Name]
Prerequisite   : PowerShell V5.1 or later
Version        : 1.0
Date           : [Current Date]

.EXAMPLE
.\AdvancedPasswordGenerator.ps1
#>

# Import required modules
Add-Type -AssemblyName System.Web

# Global variables
$script:passwordHistory = @()
$script:maxHistorySize = 10
$script:passwordFilePath = Join-Path -Path $env:USERPROFILE -ChildPath "Documents\PasswordGeneratorHistory.txt"

function Show-Menu {
    Clear-Host
    Write-Host "=== Advanced Password Generator Tool ===" -ForegroundColor Cyan
    Write-Host "1. Generate Password"
    Write-Host "2. Set Password Options"
    Write-Host "3. View Current Settings"
    Write-Host "4. View Password History"
    Write-Host "5. Evaluate Password Strength"
    Write-Host "6. Generate Passphrase"
    Write-Host "7. Export Password History"
    Write-Host "8. Exit"
}

function Set-PasswordOptions {
    $script:passwordLength = Read-Host "Enter password length (default is 16)"
    if ([string]::IsNullOrWhiteSpace($script:passwordLength)) { $script:passwordLength = 16 }
    
    $script:includeUppercase = Read-Host "Include uppercase letters? (Y/N, default is Y)"
    $script:includeUppercase = ($script:includeUppercase -ne 'N')
    
    $script:includeLowercase = Read-Host "Include lowercase letters? (Y/N, default is Y)"
    $script:includeLowercase = ($script:includeLowercase -ne 'N')
    
    $script:includeNumbers = Read-Host "Include numbers? (Y/N, default is Y)"
    $script:includeNumbers = ($script:includeNumbers -ne 'N')
    
    $script:includeSpecialChars = Read-Host "Include special characters? (Y/N, default is Y)"
    $script:includeSpecialChars = ($script:includeSpecialChars -ne 'N')

    $script:excludeSimilarChars = Read-Host "Exclude similar characters (O, 0, I, l, 1)? (Y/N, default is N)"
    $script:excludeSimilarChars = ($script:excludeSimilarChars -eq 'Y')
    
    Write-Host "Password options updated." -ForegroundColor Green
}

function View-CurrentSettings {
    Write-Host "`nCurrent Password Generation Settings:" -ForegroundColor Yellow
    Write-Host "Password Length: $script:passwordLength"
    Write-Host "Include Uppercase: $($script:includeUppercase ? 'Yes' : 'No')"
    Write-Host "Include Lowercase: $($script:includeLowercase ? 'Yes' : 'No')"
    Write-Host "Include Numbers: $($script:includeNumbers ? 'Yes' : 'No')"
    Write-Host "Include Special Characters: $($script:includeSpecialChars ? 'Yes' : 'No')"
    Write-Host "Exclude Similar Characters: $($script:excludeSimilarChars ? 'Yes' : 'No')"
    Write-Host ""
}

function Generate-Password {
    $characterSet = @()
    if ($script:includeUppercase) { $characterSet += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.ToCharArray() }
    if ($script:includeLowercase) { $characterSet += 'abcdefghijklmnopqrstuvwxyz'.ToCharArray() }
    if ($script:includeNumbers) { $characterSet += '0123456789'.ToCharArray() }
    if ($script:includeSpecialChars) { $characterSet += '!@#$%^&*()_+-=[]{}|;:,.<>?'.ToCharArray() }

    if ($script:excludeSimilarChars) {
        $characterSet = $characterSet | Where-Object { $_ -notin 'O', '0', 'I', 'l', '1' }
    }

    if ($characterSet.Count -eq 0) {
        Write-Host "Error: No character set selected. Please update your settings." -ForegroundColor Red
        return
    }

    $password = -join (1..$script:passwordLength | ForEach-Object { Get-Random -InputObject $characterSet })
    
    Write-Host "`nGenerated Password:" -ForegroundColor Green
    Write-Host $password
    Write-Host ""

    $strength = Evaluate-PasswordStrength -Password $password
    Write-Host "Password Strength: $strength" -ForegroundColor Yellow

    Add-ToPasswordHistory -Password $password

    $saveToFile = Read-Host "Do you want to save this password to a file? (Y/N)"
    if ($saveToFile -eq 'Y') {
        $fileName = "GeneratedPassword_$(Get-Date -Format 'yyyyMMdd_HHmmss').txt"
        $filePath = Join-Path -Path $env:USERPROFILE -ChildPath "Desktop\$fileName"
        $password | Out-File -FilePath $filePath
        Write-Host "Password saved to: $filePath" -ForegroundColor Green
    }
}

function Evaluate-PasswordStrength {
    param ([string]$Password)

    $score = 0

    if ($Password.Length -ge 12) { $score += 2 }
    elseif ($Password.Length -ge 8) { $score += 1 }

    if ($Password -cmatch "[A-Z]") { $score += 1 }
    if ($Password -cmatch "[a-z]") { $score += 1 }
    if ($Password -match "\d") { $score += 1 }
    if ($Password -match "[^a-zA-Z0-9]") { $score += 1 }

    switch ($score) {
        0 { return "Very Weak" }
        1 { return "Weak" }
        2 { return "Moderate" }
        3 { return "Strong" }
        4 { return "Very Strong" }
        default { return "Extremely Strong" }
    }
}

function Add-ToPasswordHistory {
    param ([string]$Password)

    $script:passwordHistory = @($Password) + $script:passwordHistory
    if ($script:passwordHistory.Count -gt $script:maxHistorySize) {
        $script:passwordHistory = $script:passwordHistory[0..($script:maxHistorySize - 1)]
    }
}

function View-PasswordHistory {
    if ($script:passwordHistory.Count -eq 0) {
        Write-Host "Password history is empty." -ForegroundColor Yellow
        return
    }

    Write-Host "`nPassword History (Most Recent First):" -ForegroundColor Yellow
    for ($i = 0; $i -lt $script:passwordHistory.Count; $i++) {
        Write-Host "$($i + 1). $($script:passwordHistory[$i])"
    }
    Write-Host ""
}

function Generate-Passphrase {
    $wordList = @("apple", "banana", "cherry", "date", "elderberry", "fig", "grape", "honeydew", "kiwi", "lemon", "mango", "nectarine", "orange", "papaya", "quince", "raspberry", "strawberry", "tangerine", "ugli", "vanilla", "watermelon", "xigua", "yuzu", "zucchini")
    $passphrase = -join ((1..4 | ForEach-Object { Get-Random -InputObject $wordList }) -join "-")
    
    Write-Host "`nGenerated Passphrase:" -ForegroundColor Green
    Write-Host $passphrase
    Write-Host ""

    Add-ToPasswordHistory -Password $passphrase
}

function Export-PasswordHistory {
    if ($script:passwordHistory.Count -eq 0) {
        Write-Host "Password history is empty. Nothing to export." -ForegroundColor Yellow
        return
    }

    $script:passwordHistory | Out-File -FilePath $script:passwordFilePath
    Write-Host "Password history exported to: $script:passwordFilePath" -ForegroundColor Green
}

# Initialize default settings
$script:passwordLength = 16
$script:includeUppercase = $true
$script:includeLowercase = $true
$script:includeNumbers = $true
$script:includeSpecialChars = $true
$script:excludeSimilarChars = $false

# Main program loop
do {
    Show-Menu
    $choice = Read-Host "`nEnter your choice (1-8)"

    switch ($choice) {
        "1" { Generate-Password }
        "2" { Set-PasswordOptions }
        "3" { View-CurrentSettings }
        "4" { View-PasswordHistory }
        "5" { 
            $pwToEvaluate = Read-Host "Enter a password to evaluate"
            $strength = Evaluate-PasswordStrength -Password $pwToEvaluate
            Write-Host "Password Strength: $strength" -ForegroundColor Yellow
        }
        "6" { Generate-Passphrase }
        "7" { Export-PasswordHistory }
        "8" { Write-Host "Exiting program..." -ForegroundColor Yellow; break }
        default { Write-Host "Invalid choice. Please try again." -ForegroundColor Red }
    }

    if ($choice -ne "8") {
        Read-Host "`nPress Enter to continue..."
    }
} while ($choice -ne "8")

This Advanced Password Generator Tool includes:

  1. A menu-driven interface with expanded options.
  2. Enhanced functions for password generation and management:
    • Customizable password generation with more options
    • Password strength evaluation
    • Password history tracking
    • Passphrase generation
    • Export functionality for password history
  3. Additional features:
    • Option to exclude similar characters (O, 0, I, l, 1) for improved readability
    • Passphrase generation using a predefined word list
    • Ability to evaluate the strength of any given password
    • Password history with a configurable size limit
    • Export functionality to save password history to a file

Key features:

  • More flexible and customizable password generation
  • Built-in password strength evaluation
  • Password history tracking for easy reference
  • Passphrase generation as an alternative to traditional passwords
  • Ability to export password history for backup or review
  • Enhanced user interface with more options and information

This tool is particularly useful for:

  • System administrators requiring advanced password management capabilities
  • Security professionals needing to generate and evaluate various types of passwords
  • Users who want a comprehensive tool for creating and managing strong passwords
  • IT professionals implementing or reviewing password policies

To use this script effectively:

  1. Run the script in PowerShell
  2. Use the expanded menu to access various features
  3. Customize password generation settings as needed
  4. Generate passwords or passphrases
  5. Use the password strength evaluation feature to check existing passwords
  6. Manage and export password history as required

This advanced script provides a more comprehensive approach to password generation and management, offering additional features for security-conscious users and professionals.

Password Generator Tool

<#
.SYNOPSIS
Password Generator Tool

.DESCRIPTION
This script generates secure passwords based on user-defined criteria including
length, and the inclusion of uppercase letters, lowercase letters, numbers, and special characters.

.NOTES
File Name      : PasswordGenerator.ps1
Author         : [Your Name]
Prerequisite   : PowerShell V3 or later
Version        : 1.0
Date           : [Current Date]

.EXAMPLE
.\PasswordGenerator.ps1
#>

function Show-Menu {
    Clear-Host
    Write-Host "=== Password Generator Tool ===" -ForegroundColor Cyan
    Write-Host "1. Generate Password"
    Write-Host "2. Set Password Options"
    Write-Host "3. View Current Settings"
    Write-Host "4. Exit"
}

function Set-PasswordOptions {
    $script:passwordLength = Read-Host "Enter password length (default is 12)"
    if ([string]::IsNullOrWhiteSpace($script:passwordLength)) { $script:passwordLength = 12 }
    
    $script:includeUppercase = Read-Host "Include uppercase letters? (Y/N, default is Y)"
    $script:includeUppercase = ($script:includeUppercase -ne 'N')
    
    $script:includeLowercase = Read-Host "Include lowercase letters? (Y/N, default is Y)"
    $script:includeLowercase = ($script:includeLowercase -ne 'N')
    
    $script:includeNumbers = Read-Host "Include numbers? (Y/N, default is Y)"
    $script:includeNumbers = ($script:includeNumbers -ne 'N')
    
    $script:includeSpecialChars = Read-Host "Include special characters? (Y/N, default is Y)"
    $script:includeSpecialChars = ($script:includeSpecialChars -ne 'N')
    
    Write-Host "Password options updated." -ForegroundColor Green
}

function View-CurrentSettings {
    Write-Host "`nCurrent Password Generation Settings:" -ForegroundColor Yellow
    Write-Host "Password Length: $script:passwordLength"
    Write-Host "Include Uppercase: $($script:includeUppercase ? 'Yes' : 'No')"
    Write-Host "Include Lowercase: $($script:includeLowercase ? 'Yes' : 'No')"
    Write-Host "Include Numbers: $($script:includeNumbers ? 'Yes' : 'No')"
    Write-Host "Include Special Characters: $($script:includeSpecialChars ? 'Yes' : 'No')"
    Write-Host ""
}

function Generate-Password {
    $characterSet = @()
    if ($script:includeUppercase) { $characterSet += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.ToCharArray() }
    if ($script:includeLowercase) { $characterSet += 'abcdefghijklmnopqrstuvwxyz'.ToCharArray() }
    if ($script:includeNumbers) { $characterSet += '0123456789'.ToCharArray() }
    if ($script:includeSpecialChars) { $characterSet += '!@#$%^&*()_+-=[]{}|;:,.<>?'.ToCharArray() }

    if ($characterSet.Count -eq 0) {
        Write-Host "Error: No character set selected. Please update your settings." -ForegroundColor Red
        return
    }

    $password = -join (1..$script:passwordLength | ForEach-Object { Get-Random -InputObject $characterSet })
    
    Write-Host "`nGenerated Password:" -ForegroundColor Green
    Write-Host $password
    Write-Host ""

    $saveToFile = Read-Host "Do you want to save this password to a file? (Y/N)"
    if ($saveToFile -eq 'Y') {
        $fileName = "GeneratedPassword_$(Get-Date -Format 'yyyyMMdd_HHmmss').txt"
        $filePath = Join-Path -Path $env:USERPROFILE -ChildPath "Desktop\$fileName"
        $password | Out-File -FilePath $filePath
        Write-Host "Password saved to: $filePath" -ForegroundColor Green
    }
}

# Initialize default settings
$script:passwordLength = 12
$script:includeUppercase = $true
$script:includeLowercase = $true
$script:includeNumbers = $true
$script:includeSpecialChars = $true

# Main program loop
do {
    Show-Menu
    $choice = Read-Host "`nEnter your choice (1-4)"

    switch ($choice) {
        "1" { Generate-Password }
        "2" { Set-PasswordOptions }
        "3" { View-CurrentSettings }
        "4" { Write-Host "Exiting program..." -ForegroundColor Yellow; break }
        default { Write-Host "Invalid choice. Please try again." -ForegroundColor Red }
    }

    if ($choice -ne "4") {
        Read-Host "`nPress Enter to continue..."
    }
} while ($choice -ne "4")

This Password Generator Tool includes:

  1. A menu-driven interface for easy navigation.
  2. Functions to:
    • Generate passwords based on user-defined criteria
    • Set password generation options
    • View current password generation settings
  3. Customizable options for password generation:
    • Password length
    • Inclusion of uppercase letters
    • Inclusion of lowercase letters
    • Inclusion of numbers
    • Inclusion of special characters
  4. Option to save generated passwords to a file on the desktop.
  5. Default settings for quick password generation.

Key features:

  • Flexible password generation based on user preferences
  • Ability to customize password complexity
  • Option to save generated passwords securely
  • User-friendly interface for easy operation
  • Viewing current settings for transparency

This tool is particularly useful for:

  • System administrators needing to generate secure passwords
  • Users who want to create strong, customized passwords
  • IT professionals managing password policies
  • Anyone needing quick access to randomly generated passwords

To use this script effectively:

  1. Run the script in PowerShell
  2. Use the menu to navigate between generating passwords, setting options, and viewing current settings
  3. Customize the password generation criteria as needed
  4. Generate passwords and optionally save them to files

This script provides a simple yet effective way to generate secure passwords with customizable criteria, helping to enhance security practices in various IT and personal scenarios.