from small one page howto to huge articles all in one place
May 25th. 2007:
April, 26th. 2006:
You are here: System->Security
A Quick and Easy Password GeneratorThis short tutorial shows you how to quickly generate a list of passwords using /dev/urandom, and uuencode.
Code Listing 1
% dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-8
The options for the cut command indicate the length of the password generated (in this case, 8 characters). This could easily be expanded to generate a whole list of passwords using the for command.
Code Listing 2
% for ((n=0;n<10;n++)); do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m -| sed -ne 2p | cut -c-8; done
To create a longer or shorter list, just change the limit in for (in this case 10).
If you want to generate WEP keys for wireless networking, you can use a similar procedure, replacing uuencode with md5sum:
Code Listing 3
% dd if=/dev/urandom count=1 2> /dev/null | md5sum | cut -c-26 aaab69457c239ef1d52617d1fa
Adapted from http://www.gentoo.org/news/en/gwn/20030804-newsletter.xml
rate this article:
current rating: average rating: 1.4 (143 votes) (1=very good 6=terrible)
Support this site
Please read "Why adblockers are bad".
Other free services