Do you need to escape the "/" in the date to "\/" and the "." in the 
seconds to "\."? (not that I know python but know enough about regex's 
to be dangerous)

Nick

On 2015-10-28 16:04, Arturo 'Buanzo' Busleiman wrote:
> Hi! For different reasons, I cannot update a particular server to
> latest fail2ban, so I am editing datedetector.py:
> 
> LOG EXAMPLE:
> 
> 22/10/2015 14:56:43.624 - Unknown User or Access Restriction block for
> cindy in POP3 from x.x.x.x
> 
> Code:
> 
>                         # 28/10/2015 7:08:50.478
>                         template = DateStrptime()
>                         template.setName("Day/Month/Year
> Hour:Minute:Second.Millisecond")
>                         template.setRegex("d{2}/d{2}/d{4}
> d{1,2}:d{2}:d{2}.d{3}")
>                         template.setPattern("%d/%m/%y %H:%M:%S")
>                         self.__templates.append(template)
> 
> fail2ban-regex:
> 
> Found a match for ' - Unknown User or Access Restriction block for
> efernandez in POP3 from 192.111.151.218
> ' but no valid date/time found for '28/10/2015 7:29:16.453'. Please
> contact the author in order to get support for this format
> 
> What am I doing wrong? I cross-checked with another dateTemplate that
> has milliseconds, but....
> 
> 
> ------------------------------------------------------------------------------
> 
> _______________________________________________
> Fail2ban-users mailing list
> Fail2ban-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fail2ban-users

------------------------------------------------------------------------------
_______________________________________________
Fail2ban-users mailing list
Fail2ban-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fail2ban-users

Reply via email to