This is a password generator written in Rust. It generates secure passwords with a specified length and saves them in separate files for easy retrieval. The generated passwords can also be copied to the clipboard for convenient use.
The password generator provides the following features:
- Generate secure passwords with a specified length
- Save generated passwords in separate files
- Retrieve passwords from saved files
- Copy passwords to the clipboard for quick access
- Rust programming language
-
Clone the repository:
git clone https://github.com/MarcosFlavioGS/Password_generator.git
-
Cd do project directory and run:
cargo build --release
The password generator can be used with the following command-line arguments:
$ ./passgen [command] [dirname]
- [command] can be any of the following:
- Generate: Generates a new password and saves it in a file in the specified directory name.
- Insert: Inserts a password into the specified dir file.
- get: Retrieves the password from the specified file.
- [dirname] is the path to the directory where the password will be stored or retrieved.
Creates a new directory named github that will contain a file with the new password:
$ ./passgen generate github
Passgen will then create a new github folder inside a password folder in your Home directory.
You could create multiple passwords for the same source passing the entire path:
./passgen generator github/profile1
Then, to retrieve the password, just type get followed profile1:
./passgen get profile1
or
./passgen get github/profile1
The generated passwords are stored in separate files within the passwords directory. Each file represents a specific password source or category.
The file structure will look like:
passwords/
├── source1/
│ └── pass
├── source2/
│ └── pass
└── source3/
└── pass