#!/bin/bash # Script "ClamAV Temps Réel", par HacKurx # http

Transcription

#!/bin/bash # Script "ClamAV Temps Réel", par HacKurx # http
28/11/2016 19:57
1/1
#!/bin/bash
# Script "ClamAV Temps Réel", par HacKurx
# http://hackurx.wordpress.com
# Licence: GPL v3
# Dépendance: clamav-daemon inotify-tools
# Recommandé pour PC de bureau: libnotify-bin
DOSSIER=/home
QUARANTAINE=/tmp
LOG=$HOME/.clamav-tr.log
inotifywait -q -m -r -e create,modify,access "$DOSSIER" --format '%w%f|%e' |
sed --unbuffered 's/|.*//g' |
while read FICHIER; do
clamdscan --quiet --no-summary -i -m "$FICHIER" --move=$QUARANTAINE
if [ "$?" == "1" ]; then
echo "`date` - Malware trouvé dans le fichier '$FICHIER'. Le fichier
a été déplacé dans $QUARANTAINE.">> $LOG
echo -e "33[31mMalware trouvé!!!33[00m" "Le fichier '$FICHIER' a été
déplacé en quarantaine."
if [ -f /usr/bin/notify-send ]; then
notify-send -u critical "ClamAV Temps Réel" "Malware trouvé!!!
Le fichier '$FICHIER' a été déplacé en quarantaine."
fi
fi
done
From:
https://wikit.firewall-services.com/ - WikiT
Permanent link:
https://wikit.firewall-services.com/doku.php/tuto/ipasserelle/divers/clamav_rt
Last update: 12/07/2012 23:00
WikiT - https://wikit.firewall-services.com/

Documents pareils