From 8e16185ef151c4b07299fd31f564282716ba5548 Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Fri, 8 Jul 2005 10:01:04 +0000 Subject: [PATCH] - Applied changes (command line options) from Yaroslav Halchenko git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@124 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- fail2ban.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/fail2ban.py b/fail2ban.py index 12ae2d77..0632cdc7 100755 --- a/fail2ban.py +++ b/fail2ban.py @@ -40,8 +40,10 @@ logSys = log4py.Logger().get_instance() logFwList = list() conf = dict() -def usage(): - print "Usage: fail2ban [OPTIONS]" +def dispUsage(): + """ Prints Fail2Ban command line options and exits + """ + print "Usage: "+sys.argv[0]+" [OPTIONS]" print print "Fail2Ban v"+version+" reads log file that contains password failure report" print "and bans the corresponding IP address using iptables." @@ -57,10 +59,17 @@ def usage(): print " -r allow a max of VALUE password failure" print " -t