passgen/README.md

102 lines
2.2 KiB
Markdown
Raw Normal View History

2024-06-16 01:04:49 +00:00
# passgen
2024-06-16 01:07:05 +00:00
## Table of Contents
- [Introduction](#introduction)
- [Building](#building)
- [Usage](#usage)
- [Options](#options)
- [Examples](#examples)
## Introduction
**passgen** is a password generation tool that allows you to create secure and
customizable passwords. It generates passwords based on user-specified
criteria, including password length and character types (lowercase letters,
uppercase letters, digits, and special characters). You can also use
**passgen** without any options to generate a random password with default
settings.
## Building
This tool is provided as source code and can be built using `make`. By just
typing make in the terminal within the code's directory:
```bash
make
```
You should now have an executable named `passgen`. You can copy it to a location
in your PATH for easy access.
## Usage
To use passgen, open your terminal and execute the program with the desired
options.
```bash
2024-06-16 01:23:16 +00:00
./passgen [OPTIONS]
2024-06-16 01:07:05 +00:00
```
## Options
**passgen** provides the following command-line options:
- `-L`, `--length`:
- Specify the length of the generated password. Default is 24 characters.
- Valid range: 5 to 4096 characters.
- `-l`, `--lower-case`:
- Enable lowercase letters in the password.
- `-u`, `--upper-case`:
- Enable uppercase letters in the password.
- `-d`, `--digits`:
- Enable digits in the password.
- `-s`, `--special`:
- Enable special characters in the password.
- `-h`, `--help`:
- Display the help message and exit.
- `-v`, `--version`:
- Display the program version and exit.
## Examples
1. Generate a default password:
2024-06-16 01:23:16 +00:00
```bash
./passgen
```
2024-06-16 01:07:05 +00:00
2024-06-16 01:23:16 +00:00
This will generate a 24-character password with a mix of lowercase letters,
uppercase letters, digits, and special characters.
2024-06-16 01:07:05 +00:00
2. Generate a password with specific options:
2024-06-16 01:23:16 +00:00
```bash
./passgen -L 12 -lud
```
2024-06-16 01:07:05 +00:00
2024-06-16 01:23:16 +00:00
This will generate a 12-character password with only lowercase letters,
uppercase letters, digits, and no special characters.
2024-06-16 01:07:05 +00:00
3. Display help message:
2024-06-16 01:23:16 +00:00
```bash
passgen -h
```
2024-06-16 01:07:05 +00:00
2024-06-16 01:23:16 +00:00
This will display the usage and available options.
2024-06-16 01:07:05 +00:00
4. Display version:
2024-06-16 01:23:16 +00:00
```bash
passgen -v
```
This will display the version of Passgen.