Created
October 21, 2012 23:02
-
-
Save altmas5/3928850 to your computer and use it in GitHub Desktop.
Ejecución de ClamAV en busca de shells, backdoors y otras MALAS hierbas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
resultado="/home/altmas5/scan.txt" | |
clamscan -r /www/ | grep FOUND > $resultado; | |
sed -i '/LibClamAV/ d' $resultado; | |
#guardando size del archivo para evitar correos vacios | |
TAM=$(stat --printf="%s" $resultado); | |
if [ "$TAM" != "0" ] #importante el espacio entre if-[-"-"-!=-"-"] | |
then | |
echo $resultado | /usr/bin/mail -s "Resultado de antivirus clamAV en servidor web" vos@tudominio.com | |
else | |
echo no hay shells; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment