20 May, 2024
Repository link: https://github.com/ProgrammerPratik/passgen
Simple and powerful CLI-based password generator made with modern C++
1. Clone the repository:
git clone https://github.com/ProgrammerPratik/passgen.git
2. Compile the program:
g++ -o passgen passgen.cpp
3. Adding to PATH Environment Variable (if you want instant access anywhere)
Windows
Linux:
export PATH=$PATH:/[path]
source ~/.bashrc # or source ~/.zshrc
Basic syntax:
passgen -l <length> -m <mode>
More:
passgen -l <length> -m <mode>
there are 3 modes i.e. 0,1,2
-h for help
OPTIONAL ARGUMENTS:
-l OR -length length of password
-m OR -mode mode of password (0=only letters,1=random,2=alphanumeric)
-h OR -help for more info
-v OR -version version info and stuff
Password generation with mode 0 (only letters)
passgen -l 10 -m 0
wJtPhQGHuMEAy <- output
Password generation with mode 1 (random)
passgen -l 8 -m 1
8%5E{6?_
Password generation with mode 2 (alphanumeric)
passgen -l 10 -m 2
8G5Ey68237