From: <los...@us...> - 2008-08-12 21:42:14
|
Revision: 710 http://fail2ban.svn.sourceforge.net/fail2ban/?rev=710&view=rev Author: lostcontrol Date: 2008-08-12 21:42:21 +0000 (Tue, 12 Aug 2008) Log Message: ----------- - Added date template for Day-Month-Year Hour:Minute:Second. - Values as string are shown in capital in the description. Modified Paths: -------------- branches/FAIL2BAN-0_8/server/datedetector.py Modified: branches/FAIL2BAN-0_8/server/datedetector.py =================================================================== --- branches/FAIL2BAN-0_8/server/datedetector.py 2008-08-12 20:59:17 UTC (rev 709) +++ branches/FAIL2BAN-0_8/server/datedetector.py 2008-08-12 21:42:21 UTC (rev 710) @@ -43,19 +43,19 @@ try: # standard template = DateStrptime() - template.setName("Month Day Hour:Minute:Second") + template.setName("MONTH Day Hour:Minute:Second") template.setRegex("^\S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}") template.setPattern("%b %d %H:%M:%S") self.__templates.append(template) # asctime template = DateStrptime() - template.setName("Weekday Month Day Hour:Minute:Second Year") + template.setName("WEEKDAY MONTH Day Hour:Minute:Second Year") template.setRegex("\S{3} \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2} \d{4}") template.setPattern("%a %b %d %H:%M:%S %Y") self.__templates.append(template) # asctime without year template = DateStrptime() - template.setName("Weekday Month Day Hour:Minute:Second") + template.setName("WEEKDAY MONTH Day Hour:Minute:Second") template.setRegex("\S{3} \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}") template.setPattern("%a %b %d %H:%M:%S") self.__templates.append(template) @@ -73,7 +73,7 @@ self.__templates.append(template) # Apache format [31/Oct/2006:09:22:55 -0000] template = DateStrptime() - template.setName("Day/Month/Year:Hour:Minute:Second") + template.setName("Day/MONTH/Year:Hour:Minute:Second") template.setRegex("\d{2}/\S{3}/\d{4}:\d{2}:\d{2}:\d{2}") template.setPattern("%d/%b/%Y:%H:%M:%S") self.__templates.append(template) @@ -85,10 +85,16 @@ self.__templates.append(template) # named 26-Jul-2007 15:20:52.252 template = DateStrptime() - template.setName("Day-Month-Year Hour:Minute:Second[.Millisecond]") + template.setName("Day-MONTH-Year Hour:Minute:Second[.Millisecond]") template.setRegex("\d{2}-\S{3}-\d{4} \d{2}:\d{2}:\d{2}") template.setPattern("%d-%b-%Y %H:%M:%S") self.__templates.append(template) + # 17-07-2008 17:23:25 + template = DateStrptime() + template.setName("Day-Month-Year Hour:Minute:Second") + template.setRegex("\d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}") + template.setPattern("%d-%m-%Y %H:%M:%S") + self.__templates.append(template) # TAI64N template = DateTai64n() template.setName("TAI64N") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |