Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
#!/bin/sh
# Скрипт обновления НОДа 32 v3 — 4
host=«http://%АДРЕС_СЕРВЕРА_ОБНОВЛЕНИЙ%»
login="%eset_ЛОГИН%"
pass="%eset_ПАРОЛЬ%"
useragent="%ЮЗЕР_АГЕНТ%"
CURDIR=%папка с обновлениями%
wget --timestamping -r -N -l 1 -nH -nd -np -o ~/scripts/nod32upd/eset_upd.log --http-user $login --http-password $pass -A ver -P $CURDIR $host/eset_upd/update.ver
mv -f $CURDIR/update.ver $CURDIR/update.rar
cd $CURDIR
7z e -y $CURDIR/update.rar
grep file= $CURDIR/update.ver |grep «engine3/»| sed -e 's/file\=//' |grep -v data > downlist1.txt
grep file= $CURDIR/update.ver |grep engine3ess| sed -e 's/file\=//' |grep -v data > downlist2.txt
grep file= $CURDIR/update.ver |grep emsx| sed -e 's/file\=//' |grep -v data > downlist5.txt
grep file= $CURDIR/update.ver |grep v3eav| sed -e 's/file\=//' |grep -v pre|grep -v data > downlist3.txt
grep file= $CURDIR/update.ver |grep v3ess| sed -e 's/file\=//' |grep -v pre|grep -v data > downlist4.txt
grep file= $CURDIR/update.ver |grep v3eav| sed -e 's/file\=//' |grep pre|grep -v data > downlist6.txt
grep file= $CURDIR/update.ver |grep v3ess| sed -e 's/file\=//' |grep pre|grep -v data > downlist7.txt
cat downlist1.txt downlist2.txt downlist5.txt > list.txt
mv -f $CURDIR/update.rar $CURDIR/update.ver
wget --timestamping -r -N -l 1 -nH -np -a ~/scripts/nod32upd/eset_upd.log -B $host --user-agent=$useragent --input-file ./list.txt --http-user $login --http-password $pass -A nup -P %DOCUMENT_ROOT%
#!/usr/bin/php
<?php
require('simple_html_dom.php');
$html = file_get_html('http://www.nnvv.org/');
$a=$html->getElementById("#nod32ids")->children(0)->children(0)->plaintext;
$a = str_replace("Username:", 'USERNAME=', $a);
$a = str_replace("Password: ", "\nPASSWORD=", $a);
echo $a."\n";
?>
#!/bin/sh
curl http://www.nnvv.org/ | \
grep -A2 Update.*`date +%Y-%m-%d` | \
awk '{if(sub(/<p>Username:/,"USERNAME=")) \
{if(sub(/<br\/>Password:/,"PASSWORD=")) \
{if(sub(/<\/p>/,"")) { print $1"\n"$2}}}}' > pass.sh
#!/bin/sh
curl http://www.nnvv.org/ | \
grep -A2 Update.*`date +%Y-%m` | \
awk '{if(sub(/<p>Username:/,"USERNAME=")) \
{if(sub(/<br\/>Password:/,"PASSWORD=")) \
{ print $1$2"\n"$3$4}}}' > pass.sh
#!/bin/sh
curl http://www.nnvv.org/ | \
grep -m2 -o -E 'Username:TRIAL-........|Password:..........' | \
sed "s/Username:/USERNAME=/g;" | \
sed "s/Password:/PASSWORD=/g;" > pass.sh
--2012-11-08 17:55:16-- http://um10.eset.com/download/win/emsx/emsx_nt64_sky.nup
Reusing existing connection to um10.eset.com:80.
HTTP request sent, awaiting response... 404 Not Found
2012-11-08 17:55:16 ERROR 404: Not Found.
Зеркало сервера обновлений ESET на Linux