Analyze β’ Generate β’ Verify β’ Protect
A terminal-based cybersecurity tool for analyzing password strength, estimating entropy and crack resistance, generating secure passwords, and checking passwords against known breach data.
Features β’ Installation β’ Usage β’ Security β’ Architecture β’ Contributing
Password Guardian is a C++ based password security toolkit designed to help users understand and improve password security through practical analysis.
Instead of simply telling you whether a password is "strong" or "weak", Password Guardian examines multiple security characteristics such as:
- Password length
- Character diversity
- Entropy
- Estimated crack resistance
- Common password characteristics
- Exposure in known compromised-password datasets
It also provides a password generator, security recommendations, and an educational attack simulation designed to demonstrate why weak passwords are dangerous.
Password Guardian is an educational security tool. It is designed to help users understand password security and make better password choices.
Evaluate passwords using multiple characteristics instead of relying only on length.
Password Guardian can analyze:
- Length
- Uppercase characters
- Lowercase characters
- Numbers
- Special characters
- Character-space diversity
- Overall password strength
Password Guardian calculates Shannon entropy to provide an additional statistical perspective on password complexity.
Entropy can help demonstrate how much uncertainty exists within a password and why larger, more diverse character spaces generally provide stronger resistance against guessing.
Password Guardian provides an estimated crack-time calculation based on password characteristics and configurable assumptions.
The purpose is educational:
A password that appears complex to a human is not necessarily resistant to automated guessing.
Crack-time estimates should therefore be treated as approximations, not guarantees.
Generate passwords using different security profiles.
The generator is designed to help users create passwords that are:
- Longer
- More random
- More difficult to guess
- Suitable for different security requirements
Instead of creating passwords such as:
Password123
Welcome123
Faizan@123
Password Guardian can generate significantly stronger alternatives.
Password Guardian can check whether a password appears in the Have I Been Pwned Pwned Passwords dataset.
The implementation is designed around the API's privacy-preserving k-anonymity approach.
The password is hashed locally, and only a partial hash prefix is sent to the service. The returned hash suffixes are then compared locally.
This means the complete password is not sent to the Pwned Passwords API.
Learn more:
Password Guardian includes an educational attack-simulation component to demonstrate how password guessing can work against weak passwords.
The purpose is security education, not unauthorized access.
It helps users understand concepts such as:
- Guessing attacks
- Password complexity
- Search spaces
- Weak-password risk
- Why longer passwords matter
β οΈ Use security testing and attack simulation only in environments you own or have explicit permission to test.
Password Guardian provides practical recommendations based on password-analysis results.
Examples include:
- Increase password length
- Use greater character diversity
- Avoid predictable patterns
- Avoid reused passwords
- Avoid passwords found in breach datasets
- Prefer randomly generated passwords
- Use unique passwords for different services
Password Guardian is designed around a terminal-based interface with ANSI styling.
The interface focuses on:
- Clear security results
- Readable output
- Simple navigation
- Security-focused terminology
- Lightweight execution
Passwords remain one of the most common authentication mechanisms, but weak or reused passwords can significantly increase the impact of credential attacks.
A password can appear strong because it contains:
Uppercase + lowercase + numbers + symbols
while still being predictable.
For example:
Password@123
Admin@2026
Welcome#123
Password Guardian approaches password evaluation from several angles rather than relying on a single "strong/weak" rule.
Password Guardian combines several concepts when evaluating passwords:
ββββββββββββββββββββββββ
β PASSWORD β
ββββββββββββ¬ββββββββββββ
β
ββββββββββββββββΌβββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββ ββββββββββββββ βββββββββββββββ
β Strength β β Entropy β β Breach β
β Analysis β β Analysis β β Check β
βββββββ¬ββββββ βββββββ¬βββββββ ββββββββ¬βββββββ
β β β
ββββββββββββββββΌβββββββββββββββββ
βΌ
ββββββββββββββββββββ
β Security Result β
ββββββββββ¬ββββββββββ
β
βΌ
ββββββββββββββββββββ
β Recommendations β
ββββββββββββββββββββ
The result is intended to give users a broader understanding of password security rather than relying on one metric.
| Technology | Purpose |
|---|---|
| C++17 | Core application |
| CMake | Build configuration |
| SHA-1 | Password hash generation for Pwned Passwords lookup |
| HTTP/REST API | Breach-data integration |
| ANSI Escape Codes | Terminal styling |
| Standard C++ Library | Core utilities and data processing |
PasswordGuardian/
β
βββ include/
β βββ AttackSimulator.h
| βββ Entropy.h
| βββ HIBP.h
| βββ PasswordAnalyzer.h
| βββ PasswordGenerator.h
β βββ Utils.h
β
βββ src/
β βββ AttackSimulator.cpp
| βββ Entropy.cpp
| βββ HIBP.cpp
| βββ PasswordAnalyzer.cpp
| βββ PasswordGenerator.cpp
| βββ Utils.cpp
β βββ main.cpp
β
βββ CMakeLists.txt
βββ README.md
βββ LICENSE
The project separates headers and implementation files to keep the codebase organized and maintainable.
Before building Password Guardian, make sure you have:
- A C++17-compatible compiler
- CMake
- Git
- Internet access for the Pwned Passwords lookup feature
On Debian/Ubuntu-based systems:
sudo apt update
sudo apt install g++ cmake gitRecommended options:
- Visual Studio with C++ development tools
- MinGW
- CMake
- Git
Verify your installation:
g++ --version
cmake --version
git --versiongit clone https://github.com/faizi-cybsec/PasswordGuardian.git
cd PasswordGuardianCreate a build directory:
mkdir build
cd buildConfigure the project:
cmake ..Build:
cmake --build .Depending on your platform and CMake generator, the resulting executable may be located in a different directory.
After building, run the generated Password Guardian executable.
./PasswordGuardianThe executable may be generated inside the appropriate CMake build directory, for example:
.\Debug\PasswordGuardian.exeor:
.\PasswordGuardian.exeThe exact path depends on the compiler and CMake generator being used.
After launching Password Guardian, use the terminal interface to access the available security functions.
A typical workflow looks like:
βββββββββββββββββββββββββββββββββββββββββββββββ
β PASSWORD GUARDIAN β
βββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β [1] Analyze Password β
β [2] Generate Password β
β [3] Check Password Exposure β
β [4] Attack Simulation β
β [5] Security Recommendations β
β [0] Exit β
β β
βββββββββββββββββββββββββββββββββββββββββββββββ
The exact menu and available options may change as the project evolves.
A password analysis can provide information such as:
Password Security Analysis
ββββββββββββββββββββββββββββββββββββ
Length : 16
Character Diversity : High
Entropy : High
Estimated Resistance: Strong
Breach Status : Not Found
Recommendation:
β Use a unique password
β Avoid password reuse
β Consider using a password manager
The exact output depends on the password and the current implementation.
Password Guardian's breach-checking functionality is designed around the Have I Been Pwned Pwned Passwords range API.
The process can be summarized as:
USER PASSWORD
β
βΌ
Local SHA-1 Hash
β
βΌ
First 5 Characters
β
βΌ
Pwned Passwords API
β
βΌ
Hash Suffixes Returned
β
βΌ
Local Comparison
β
ββββββββ΄βββββββ
βΌ βΌ
FOUND NOT FOUND
β β
βΌ βΌ
Compromised No Match
The full password is not sent to the service.
According to the HIBP documentation, the range API receives the first five characters of a SHA-1 or NTLM hash and returns matching suffixes and prevalence counts for local comparison.
Password Guardian is an educational security tool, not a replacement for a professional password manager or enterprise identity-security platform.
Crack-time calculations are approximations.
Real-world attack speed depends on factors including:
- Hardware
- Hashing algorithm
- Rate limiting
- Password policies
- Attack methodology
- Available wordlists
- Credential stuffing
- Target environment
Therefore:
An estimated crack time should never be treated as a guarantee.
A password not appearing in the Pwned Passwords dataset does not prove that the password is secure.
It only means that the password was not found in the dataset queried at the time of checking.
The attack-simulation functionality exists to demonstrate password-security concepts in a controlled environment.
It should only be used against:
- Your own test data
- Your own systems
- Explicitly authorized environments
- Educational lab environments
Never use Password Guardian to attempt unauthorized access to accounts or systems.
Password Guardian was created with several goals:
Transform cybersecurity concepts into a practical C++ application.
Explore concepts such as:
- Entropy
- Password complexity
- Hashing
- Brute-force concepts
- Credential exposure
- Password generation
Apply security concepts while building a real software project.
Create something that can be compiled, executed, tested, and extended rather than remaining purely theoretical.
Future improvements may include:
- More advanced password-strength heuristics
- Improved password-generation profiles
- More detailed analysis reports
- Configurable attack-simulation parameters
- Unit testing
- Automated CI builds
- Cross-platform testing
- Improved CLI navigation
- Exportable security reports
- Additional password-risk indicators
- Improved documentation
- Performance optimizations
Roadmap items are subject to change as development continues.
Testing is an important part of future development.
Planned testing areas include:
Password Analysis
β
βββ Length checks
βββ Character-set checks
βββ Entropy calculations
βββ Strength classification
Password Generator
β
βββ Length validation
βββ Character diversity
βββ Randomness checks
Breach Checking
β
βββ Hash generation
βββ API communication
βββ Prefix handling
βββ Local suffix comparison
Contributions are welcome.
If you want to improve Password Guardian:
git clone https://github.com/YOUR-USERNAME/PasswordGuardian.git
cd PasswordGuardiangit checkout -b feature/improve-password-analysisImplement and test your improvement.
git add .
git commit -m "Improve password analysis"git push origin feature/improve-password-analysisDescribe:
- What you changed
- Why you changed it
- How you tested it
- Any limitations or known issues
Found a problem?
Please open an issue:
π Report an Issue
When reporting a bug, include:
- Operating system
- Compiler
- CMake version
- Steps to reproduce
- Expected behavior
- Actual behavior
- Relevant error output
Please never include real passwords, credentials, API keys, or other sensitive information in issues.
Password Guardian is intended for:
- Cybersecurity education
- Password-security awareness
- Authorized security testing
- Personal security experimentation
- C++ security development
- Security research in controlled environments
The developer does not encourage unauthorized access, credential theft, password attacks against third-party systems, or other illegal activity.
Always obtain permission before performing security testing against systems you do not own.
Password Guardian is released under the MIT License.
See the LICENSE file for the complete license text.
Special thanks to the security community and the open-source projects and standards that make security research and education accessible.
Password Guardian uses the Pwned Passwords service for compromised-password checking.
Learn more:
π https://haveibeenpwned.com/Passwords
π https://haveibeenpwned.com/API/v3
The Pwned Passwords API provides a privacy-preserving range-search mechanism using k-anonymity.
Faizan Ahmad
Cybersecurity Student | Security Research & Defensive Security
GitHub: https://github.com/faizi-cybsec
LinkedIn: https://www.linkedin.com/in/faizi-cybsec/