A python script that parses ssh logs, writing entries to hosts.deny after a threshhold of unsuccessful login attempts has been reached.
http://denyhosts.sourceforge.net/