genpass
is a simple utility written in Rust for quickly generating random passwords of a user-specified length with customizable character sets.
- Random password generation from Latin characters (upper and lower case), numbers and special characters.
- A simple command to create a password of
any
length. - Suitable for quick use in the command line.
- Use custom text patterns
- Rust ~> 1.82.0.
-
Clone the repository or download the source code:
git clone https://github.com/kostDev/genpass.git cd genpass cargo run --package genpass --bin genpass --quiet
-
Build the project in release mode:
cargo build --release
-
Make the utility available globally (optional):
sudo cp target/release/genpass /usr/local/bin/
genpass
examples:
example 1: default 'a' 'n' 's'
➜ genpass
>> 24 a n s
Yours generated password[24]: 5=~v;4cv1f;1.8nfto+.+;5@
------------------------------------------------------------
example 2: 'custom user pattern'
➜ genpass
>> 24 @#$%^.
Yours generated password[24]: %@#@@#@.$%@.$$.#^%@@@.@.
------------------------------------------------------------
example 3: combining
>> 24 a n @_@_@:
Yours generated password[24]: @t_3d@27lo8gx1c1b2v@@o4d
where:
- a: lowercase
[a-z]
- aa: uppercase
[A-Z]
- s: symbols:
[#$%^*_-=+~;[<{(:&|@:)}>];~.?!]
- n: numbers
[0-9]