md5pw - a tool for maintaining passwords
md5pw
md5pw generates a password using a MD5 hash digest.
The digest will be created from a parameter (i.e. a hostname) plus a passphrase. It transforms the digest to its hex form, reverses it and uses the 10 last letters as the password, which will be printed blue on blue color using shell escapes so it will not be readable by others looking at your screen. But you can still copy/paste the password for using it.
This allows you to maintain string passwords for your various hosts by using one single passphrase.
If standard input is not connected to a tty, it doesn't print a prompt, if the output is not a tty, it will not use shell escapes to colourize the output, e.g.:
echo "passphrase" | md5pw hostname > file.txt
You shall not install this tool on the hosts, where you set passwords generated by it.
You must make sure that the master passphrase is protected, i.e. not written anywhere, not guessable and so on.
md5pw requires one parameter, which can be a hostname, but may also be any arbitrary string.
md5pw does not determine the terminal capabilities, so if you are using it on an uncapable terminal which is not able to handle shell escapes, the output will look cluttered. Redirect its output into a variable or a file in this case instead of displaying it.
Copyright (c) 2002-2004 by T.L.
T.L.