A command line utility for generating a random string of characters, based on a set of rules
$ strgen -l 32
C!uRDzQPC1o541)efteqvyB$5#JGseMU
$ strgen -l 4 -c 5
4149
$ strgen -l 24 -c 4 -e
MFUEiu4sieDKz#M^Gwx#ev2U
148.078200
$ strgen -l 1 -c 1234567890
8
$ echo (strgen -l 32 -r 10) > passwords.txt
$ cat passwords.txt
^cgHoi0LbgLc9ISAhavOYw4RT*a$Ee1f 64N%&Lz*CV2iikI)kNN5%zoHu0tJc3OX P6vtmV0OfKWnEj9OWKmuTA2Xj#llOKT& k&mwyk%DUvAeEhC%RykpJWWSqSN#^*Yb %%y(3(lntvbHCoh@Mb(#XEC7b1H7VkYK 3bsx3DL$Ywd6KkTclBRS#)vQZ2szX*Uq (^OLe%xMkkCFv4Hqmd%!$&wvVOFhteya 1^L3KSfE@s%5dvd)jW11P4bajGhCuFD) gYNQwCa%U%WX8JG5l*xK!yKUOS$5$)R& X&t@wdB*XcDRwTorPL!fUb1(DwQ)v97(
Clone the repository
$ git clone https://github.com/sdx6/strgen/
Ensure you have clang
installed on your system, if not grab it from your local package manager
$ sudo apt install clang
$ sudo pacman -S clang
$ sudo dnf install clang
$ sudo zypper install clang
$ apx install clang
environment.systemPackages = [
pkgs.rocmPackages.llvm.clang
];
Move to the repository
$ cd strgen/
Build and run
$ make && ./strgen
Optionally, move the binary to /usr/bin/ so that it can be executed as a program
$ sudo mv strgen /usr/bin/strgen