|
| 1 | +# Password Strength Checker |
| 2 | + |
| 3 | +A simple C program that evaluates the strength of a password based on various criteria. |
| 4 | + |
| 5 | +## Description |
| 6 | + |
| 7 | +This program analyzes a password and determines its strength based on the following factors: |
| 8 | +- Presence of uppercase letters |
| 9 | +- Presence of lowercase letters |
| 10 | +- Presence of digits |
| 11 | +- Presence of special characters |
| 12 | +- Minimum length of 8 characters |
| 13 | + |
| 14 | +## Features |
| 15 | + |
| 16 | +- Real-time password strength evaluation |
| 17 | +- Three strength levels: Weak, Medium, and Strong |
| 18 | +- Simple command-line interface |
| 19 | +- Character type detection (uppercase, lowercase, digits, special characters) |
| 20 | + |
| 21 | +## Compilation |
| 22 | + |
| 23 | +To compile the program, use any C compiler such as GCC: |
| 24 | + |
| 25 | +```bash |
| 26 | +gcc password_checker.c -o password_checker |
| 27 | +``` |
| 28 | + |
| 29 | +## Usage |
| 30 | + |
| 31 | +Run the compiled program: |
| 32 | + |
| 33 | +```bash |
| 34 | +./password_checker |
| 35 | +``` |
| 36 | + |
| 37 | +Enter your password when prompted. The program will analyze it and display the strength level. |
| 38 | + |
| 39 | +### Example |
| 40 | + |
| 41 | +``` |
| 42 | +Enter your password: MyP@ss123 |
| 43 | +
|
| 44 | +Password Strength: Strong |
| 45 | +``` |
| 46 | + |
| 47 | +## Strength Criteria |
| 48 | + |
| 49 | +The program calculates strength based on a scoring system (0-5 points): |
| 50 | + |
| 51 | +- **Weak** (0-2 points): Password lacks multiple character types or is too short |
| 52 | +- **Medium** (3-4 points): Password has good variety but may be missing some criteria |
| 53 | +- **Strong** (5 points): Password meets all criteria including length and character variety |
| 54 | + |
| 55 | +### Scoring Breakdown |
| 56 | +- 1 point: Contains uppercase letters |
| 57 | +- 1 point: Contains lowercase letters |
| 58 | +- 1 point: Contains digits |
| 59 | +- 1 point: Contains special characters |
| 60 | +- 1 point: Length is 8 or more characters |
| 61 | + |
| 62 | +## Limitations |
| 63 | + |
| 64 | +- The program uses `scanf("%s", password)` which stops at whitespace, so passwords containing spaces cannot be fully tested |
| 65 | +- Maximum password length is limited to 99 characters |
| 66 | +- No buffer overflow protection beyond the array size |
| 67 | +- Doesn't check against common password lists or patterns |
| 68 | + |
| 69 | +## Security Note |
| 70 | + |
| 71 | +This is a basic educational tool for demonstrating password strength concepts. For production applications, use established password validation libraries and follow current security best practices. |
| 72 | + |
| 73 | +## Requirements |
| 74 | + |
| 75 | +- C compiler (GCC, Clang, or similar) |
| 76 | +- Standard C library with `stdio.h`, `string.h`, and `ctype.h` |
| 77 | + |
| 78 | +## License |
| 79 | + |
| 80 | +Free to use and modify for educational purposes. |
0 commit comments