From 4498b89a7501f95a41113e8d4086f7d750c8e2c0 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 3 May 2015 13:20:35 +0200 Subject: [PATCH] take ip6 addresses into account for log regex --- utils/cron_ipanalyse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/cron_ipanalyse.py b/utils/cron_ipanalyse.py index aba5e510..4dddb1cf 100755 --- a/utils/cron_ipanalyse.py +++ b/utils/cron_ipanalyse.py @@ -58,8 +58,8 @@ BLOCK_LIMIT = BLOCK_LOWER time_regex = r'(?P\d\d)/(?P[A-Za-z]+)/(?P\d\d\d\d):(?P\d\d):(?P\d\d):(?P\d\d) [+-]\d\d\d\d' -format_pat= re.compile(r'(?P[(\d\.)]+) - - \['+ time_regex + r'] "(?P.*?)" (?P\d+) (?P\d+) "(?P.*?)" "(?P.*?)"') -time_pat= re.compile(r'[(\d\.)]+ - - \[' + time_regex + '\] ') +format_pat= re.compile(r'(?P[a-f\d\.:]+) - - \['+ time_regex + r'] "(?P.*?)" (?P\d+) (?P\d+) "(?P.*?)" "(?P.*?)"') +time_pat= re.compile(r'[a-f\d:\.]+ - - \[' + time_regex + '\] ') logtime_pat = "%d/%b/%Y:%H:%M:%S %z" -- 2.39.5