Twitter | Search | |
Roman 🐑 Sep 26
Generate passwords on /dev/urandom + tr + fold + head [:alnum:] is 5.954 bits of entropy per char, so 20 chars is safe for pretty everything ;)
Reply Retweet Like
Bojan Nastic Sep 26
Replying to @romanzolotarev
Many sites won’t let you in without a β€œspecial” char in the password. I remember seeing similar but β€œbetter” script on ’s gopher site
Reply Retweet Like
Roman 🐑 Sep 26
Replying to @bnastic
1. Close the browser tab and clear the history. Never visit those sites again. 2. Better? No way :) <3
Reply Retweet Like
Bojan Nastic
LEN=${1:-16}; tr -cd ' -~' < /dev/urandom | fold -w | sed 1q
Reply Retweet Like More
Roman 🐑 Sep 26
Replying to @bnastic
Hmm, okay.jpeg ' -~' vs [:alnum:] aren't the same head -1 vs sed 1q, really?
Reply Retweet Like
Bojan Nastic Sep 26
Replying to @romanzolotarev
I just copied the line verbatim. The β€˜ -~’ is the important difference. Despite you not liking it, I can’t dictate what password policy services want to enforce.
Reply Retweet Like
Roman 🐑 Sep 26
Replying to @bnastic
Yep. Makes sense.
Reply Retweet Like
Tim Chase Sep 26
You can also stack characters you want to allow: $ tr -cd [:alnum:][:punct:] < /dev/urandom | fold -w 20 | head -1 or just specific characters like comma, period, and underscore: $ tr -cd [:alnum:]',._' < /dev/urandom | fold -w 20 | head -1
Reply Retweet Like
Roman 🐑 Sep 26
Replying to @gumnos @bnastic
Or just $ tr -cd [:print:] ...
Reply Retweet Like
Tim Chase Sep 26
Or that, but more showing the set-composability aspect πŸ˜‰
Reply Retweet Like
Roman 🐑 Sep 26
Replying to @gumnos @bnastic
Thank you! :)
Reply Retweet Like