Hispanitat nº 7 Local C

08225, Terrassa (Barcelona)

+34 600 676 872

Soporte Técnico

Lunes-Viernes: 9:30 a 13:30 - 16:30 a 20:00

Sábados a convenir

Forum breadcrumbs - You are here:ForoCategoría principal: CENTOS 7clamav
Por favor, o Regístrate para crear mensajes y debates.

clamav

script onacces scan

#!/bin/sh
tail -fn0 /var/log/clamav/clamav.log | \
while read line ; do
echo "$line" | grep -oP "ScanOnAccess: \K(.*)(?=:(.*) FOUND)"
if [ $? = 0 ]
then
virusfile=$(echo "$line" | grep -oP "ScanOnAccess: \K(.*)(?=:(.*) FOUND)" | grep -oP "(.*)(?=:(.*))")
if [ -n "$virusfile" ]
then
echo "Found and quarantined virus file: $virusfile" >> /var/log/clamav/clamav-cleaner.log
mv $virusfile /path/to/quarantine/
fi
fi
done

WhatsApp chat