-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46a1a4c
commit d591e75
Showing
1 changed file
with
26 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,40 @@ | ||
Description | ||
This C program generates random passwords based on user input. The user specifies: | ||
|
||
The number of passwords to generate. | ||
The length of each password. | ||
The generated passwords are saved in a file named passwords.txt, ensuring secure storage for later use. | ||
Features | ||
Dynamic Password Generation: | ||
|
||
Create as many passwords as you need. | ||
Set a custom length for each password. | ||
Randomized Characters: | ||
|
||
Passwords include uppercase, lowercase, digits, and special characters for better security. | ||
File Storage: | ||
|
||
All passwords are saved in a file (passwords.txt), making it easy to retrieve them. | ||
How to Use | ||
Compile the Program: Use GCC to compile the program: | ||
|
||
π‘οΈ Random Password Generator | ||
β‘ Features | ||
Customizable Passwords: Generate as many passwords as you need, with your chosen length. | ||
Strong Security: Uses uppercase, lowercase, numbers, and special characters. | ||
File Storage: Saves all passwords in passwords.txt for easy access. | ||
π How to Use | ||
Compile: | ||
bash | ||
Copy code | ||
gcc password_generator.c -o password_generator | ||
Run the Program: Execute the compiled program: | ||
|
||
Run: | ||
bash | ||
Copy code | ||
./password_generator | ||
Input Details: | ||
|
||
Enter the number of passwords you want. | ||
Enter the length of each password. | ||
View Generated Passwords: | ||
|
||
Passwords will be displayed on the terminal. | ||
All passwords are saved to a file named passwords.txt in the same directory. | ||
Sample Output | ||
Input: | ||
Enter the number of passwords to generate. | ||
Enter the length for each password. | ||
View Output: | ||
Passwords are displayed on the terminal. | ||
Check passwords.txt for all saved passwords. | ||
π Example | ||
bash | ||
Copy code | ||
Enter the number of passwords to generate: 3 | ||
Enter the length of each password: 12 | ||
Enter the number of passwords to generate: 2 | ||
Enter the length of each password: 8 | ||
|
||
Generated Passwords: | ||
1: $aB3#xY7g!H9 | ||
2: KqT8!f@4rP2z | ||
3: W@hG2v&L7*Y9 | ||
|
||
All passwords saved to 'passwords.txt'. | ||
File (passwords.txt) Content: | ||
|
||
perl | ||
Copy code | ||
$aB3#xY7g!H9 | ||
KqT8!f@4rP2z | ||
W@hG2v&L7*Y9 | ||
Customization | ||
Change Characters: Modify the charset in the program to add/remove specific characters. | ||
|
||
1: a3$XyT@q | ||
2: P9!fKz7& | ||
Saved to passwords.txt β | ||
π οΈ Customization | ||
Add/Remove characters in charset[]: | ||
c | ||
Copy code | ||
const char charset[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+[]{}|;:,.<>?"; | ||
Change File Name: Update the file name in the code: | ||
|
||
const char charset[] = "ABC...@#$"; | ||
Change file name: | ||
c | ||
Copy code | ||
FILE *file = fopen("custom_passwords.txt", "w"); | ||
Limitations | ||
The maximum password length depends on your system's memory. | ||
Ensure proper file permissions to write the passwords.txt file. | ||
License | ||
This project is open-source and free to use. Contributions and suggestions are welcome! | ||
FILE *file = fopen("my_passwords.txt", "w"); | ||
π Enjoy Secure Passwords! π»β¨ |