Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37507285
en ru br
Репозитории ALT
S:0.103.8-alt1
5.1: 0.98.1-alt0.M51.1
4.1: 0.97.8-alt0.M41.1
+updates:0.94.1-alt0.M41.1
4.0: 0.97.8-alt0.M40.1
+updates:0.91.2-alt1
3.0: 0.86.2-alt1
+updates:0.91.1-alt0.M30.1
+backports:0.93.3-alt0.M30.1
www.altlinux.org/Changes

Другие репозитории
Upstream:0.93rc1

Группа :: Работа с файлами
Пакет: clamav

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# Copyright (C) 2004 Sergey Y. Afonin <asy@kraft-s.ru>
# License: none
# You can use, redistribute and modify it without any limitations
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY.
#
# clamav-milter specific (based on sendmail's log)
# cron string:
# 00 */1 * * * root /usr/local/bin/virusstat-perIP-PrevHour
#
# Known bugs:
# 1. last hour before logrotate isn't processed
#
# v 0.2 2004-12-??
# fix: add first "0" to 0-9 hours
#
# v 0.1 2004-10-02
# initial
#

PATH="/root/bin:/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin"

export PATH

CAT='cat'
LOG='/var/log/mail/all'
SERVER='AV Server'
VIRADMINS='root@localhost,postmaster@localhost'

TIMEEND=`date +%k`
TIME=$[$TIMEEND-1]
[ $TIME = "-1" ] && TIME=23
[ $[ $TIME < 10 ] == 1 ] && TIME="0$TIME"

(echo Statistic by viruses per IP from $TIME:00 to $TIMEEND:00 names: && echo &&\
$CAT $LOG |grep 'Intercepted virus from'|egrep "^.*$TIME:[0-6][0-9]:[0-6][0-9]"|grep '\[.*\..*\]'|\
sed -e 's/^.*clamfi_eom:.*: \(.*\) .*\[\(.*\)\] .*/\1 \2/'|\
sort|uniq -c|sort -r &&\
echo && echo "Scanned by ClamAV Antivirus (http://www.clamav.net/)")|\
mail -s "Virus Statistic per IP (from $TIME:00 to $TIMEEND:00) on $SERVER" $VIRADMINS
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin