Добрый день.
Сново подниму тему НОД32
Купил пару ключей, все оно хорошо но хочеться лутше. Нод 3 версии СМАРТ СЕКЮРИТИ ! )))
Подумал а почему не поставить на ФРЕ скрипт который будет тянуть обновления ложить их в какуюто папку и эту папку кормить апачу а потом народу.
Начал рыть по форумам и нашел кучу разных скриптов.
полистав остановился на скрипе от "Urgor"
Код: Выделить всё
#!/usr/bin/perl
use LWP;
# path to store updates
$PATH="/home/www/mail.kk.com/nod";
$WGET="/usr/local/bin/wget"; # Путь к программе wget
# username/password for updates registered users
$LOGIN='AV-6327330';
$PASS='yt8jc2gyb9';
# URL for updates
$URL_UPD="http://u21.eset.com/";
$URL_UPD =~ s/\/$//;
$URL_UPD =~ m/(.*:\/\/)(.*?)(\/.*)/;
$site = "$1$2";
if ($site =~ m//) {
print "Enter correct URL\n";
return;
}
unlink("$PATH/update.ver","$PATH/update.tmp");
download($PATH,"$URL_UPD/nod_upd/update.ver",$LOGIN,$PASS);
`/usr/local/bin/unrar e -y $PATH/update.ver $PATH 2> /dev/null`;
rename("$PATH/update.ver","$PATH/update.tmp");
$ver = "$PATH/update.tmp";
$vers = "$PATH/update.ver";
open(VER, "< $ver") or die "Couldn't open $ver for reading: $!\n";
open(VERS, "> $vers") or die "Couldn't open $vers for writing: $!\n";
%files = ();
%urls = ();
while (defined($line = <VER>) )
{
chomp $line;
($par,$val)=split /=/, $line;
$val = substr($val, 0, -1);
if ($par =~ /file/ )
{
$name = '/'.$val;
$name =~s/\/.*\///;
$furl="$URL_UPD/$val";
$line="file=$name";
}
if ($par =~/size/ )
{
$size = $val;
$files{$name} = $size;
$urls{$name} = "$furl";
}
print VERS "$line\r\n";
}
print "\n";
close(VER);
close(VERS);
foreach $f (keys %files) {
if ((-s "$PATH/$f") != $files{$f}){
# $size = (-s "$PATH/$f");
# print "Not present --> $PATH/$f\t$f\t$files{$f} ---> $size\n";
unlink("$PATH/$f");
download($PATH,$urls{$f},$LOGIN,$PASS);
} else { #print " Present --> $PATH/$f\t$f\t$files{$f}\n";
}
}
chmod(0644,"$PATH/*");
sub download()
{
my ($path, $url, $login, $pass) = @_;
system("$WGET -P $path --http-user=$login --http-password=$pass $url");
}
Влепил свои ключи и думаю вот оно мое счастье, но сразу после запуска понял что рано радовался ....
Вот что мне выдает
Код: Выделить всё
www# /usr/local/etc/rc.d/nod32.sh
--2008-04-08 15:12:01-- http://u21.eset.com/nod_upd/update.ver
Resolving u21.eset.com... 89.202.157.131
Connecting to u21.eset.com|89.202.157.131|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4009 (3.9K) [application/octet-stream]
Saving to: `/var/www/webserver/admins/nod/update.ver'
100%[====================================================================================================================>] 4,009 --.-K/s in 0.06s
2008-04-08 15:12:07 (71.0 KB/s) - `/var/www/webserver/admins/nod/update.ver' saved [4009/4009]
Код: Выделить всё
www# ls -l /var/www/webserver/admins/nod/
total 8
-rw-r--r-- 1 root wheel 4009 Apr 8 10:52 update.tmp
-rw-r--r-- 1 root wheel 4029 Apr 8 15:12 update.ver
Что может быть тому причиной что он ничего не тянет.
Пасиб за ранее !
С ув.
Юрий.