|
|
|
|
|
by 0xmohit
3658 days ago
|
|
> I use https://lastpass.com/ for generating passwords. ... Would prefer open source, but nothing else comes close. On a linux/unix system, one could use /dev/urandom: tr -dc '[[:alnum:][:punct:]]' < /dev/urandom | head -16c
would generate a 16 character long password.One could even put the following function in $HOME/.bash_profile or such genpw() {
tr -dc '[[:alnum:][:punct:]]' < /dev/urandom | head -${1-16}c
}
Now invoking it by saying genpw would generate a pseudorandom string of 16 characters length. You could specify the length by passing a parameter to it, e.g. genpw 8. |
|