Need to ban people who hammer your ftp, but dont want to or cant install fail2ban ? This may help get you on the right track:
#!/usr/bin/env python import popen2, re, datetime, time, os, sys, logging, syslogread moretimeLimit = 300 # in seconds (== 5 minutes) failureLimit = 5 # X number of fails …