Perl program to generate XKCD-style passwords
I want there to be NO barriers to using this code, so I am releasing it to the public domain. But "public domain" does not have an internationally agreed upon definition, so I use CC0:
To the extent possible under law, the contributors to this project have waived all copyright and related or neighboring rights to this work. In other words, you can use this code for any purpose without any restrictions. This work is published from: United States. The project home is https://github.com/fordsfords/pgen
To contact me, Steve Ford, project owner, you can find my email address at http://geeky-boy.com. Can't see it? Keep looking.
XKCD had an excellent comic -- https://xkcd.com/936/ -- which proposed a style of password generation consisting of randomly selecting 4 words from a list of ~2000 common words. The result is a password which is more secure and easier to remember than most common methods of password creation.
The pgen program downloads a list of common english words and randomly selects some for a password. I used the program to produce some mildly-interesting results in my blog.
Here are the interesting features of the program:
It starts with a set of 3000 words published by Education First and filters it by word length.
It can either use Perl's internal pseudo-random number generator (useful for experimentation and statistics gathering), or it can get random numbers from https://random.org which makes the resulting password properly secure.
You can get help by entering:
Important: if you plan to actually use the passwords you generate, use "-r"! Here's why.
2000.sh and 3000.sh
These shell scripts are not needed since I included code in the Perl program to fetch the Education First list. (The reason I do this is that the material on Education First's site is copyrighted, so I can't just snag a copy of their word list without permission.)