scannedonly_clamav.patch
backend/actions/virus.py | ||
---|---|---|
12 | 12 |
par l'anti-virus temps réél |
13 | 13 |
""" |
14 | 14 |
from os.path import join, isfile |
15 |
import re |
|
15 | 16 |
from pyeole.process import system_out |
16 | 17 |
from ead2.config.config import dico |
17 | 18 |
from ead2.backend.actions import tools |
... | ... | |
25 | 26 |
Renvoie la liste des virus détéctés |
26 | 27 |
""" |
27 | 28 |
log_path = '/var/log/rsyslog/local/scannedonlyd_clamav/' |
29 |
re_log = re.compile(r'scannedonlyd_clamav\.warning\.log-[0-9]{8}\.gz') |
|
28 | 30 |
file1 = join(log_path, 'scannedonlyd_clamav.warning.log') |
29 |
file2 = join(log_path, 'scannedonlyd_clamav.warning.log.1.gz') |
|
31 |
file2 = [ path for path in os.listdir(log_path) if re_log.search(path)] |
|
32 |
file2.sort() |
|
33 |
file2 = file2[-1] |
|
30 | 34 |
max_vir = 30 |
31 | 35 |
mois = {} |
32 | 36 |
mois["jan"] = "janvier" #idem |