<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>榆树网 &#187; AntiVirus</title>
	<atom:link href="http://www.wenzk.com/archives/tag/antivirus/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wenzk.com</link>
	<description>http://www.wenzk.com</description>
	<lastBuildDate>Thu, 09 Feb 2012 07:57:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>如何制作Clamav的特征库</title>
		<link>http://www.wenzk.com/archives/477</link>
		<comments>http://www.wenzk.com/archives/477#comments</comments>
		<pubDate>Thu, 03 Dec 2009 13:12:24 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[AntiVirus]]></category>
		<category><![CDATA[clamav]]></category>
		<category><![CDATA[Signature]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=477</guid>
		<description><![CDATA[详见：http://www.sanesecurity.com/wiki.htm http://nickciske.com/tools/hex.php method 相关文章在网上找到的一个Nod32升级脚本 (0)Clamav DB 镜像站点开始工作 (0)Mirroring the Clamav Virus Database (0)]]></description>
			<content:encoded><![CDATA[<p>详见：http://www.sanesecurity.com/wiki.htm</p>
<p>http://nickciske.com/tools/hex.php</p>
<p><a href="http://www.wenzk.com/wp-content/uploads/2009/12/method.pdf">method</a></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/402" title="在网上找到的一个Nod32升级脚本">在网上找到的一个Nod32升级脚本</a> (0)</li><li><a href="http://www.wenzk.com/archives/119" title="Clamav DB 镜像站点开始工作">Clamav DB 镜像站点开始工作</a> (0)</li><li><a href="http://www.wenzk.com/archives/54" title="Mirroring the Clamav Virus Database ">Mirroring the Clamav Virus Database </a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/477/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在网上找到的一个Nod32升级脚本</title>
		<link>http://www.wenzk.com/archives/402</link>
		<comments>http://www.wenzk.com/archives/402#comments</comments>
		<pubDate>Tue, 13 Oct 2009 00:32:29 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-网络]]></category>
		<category><![CDATA[AntiVirus]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nod32]]></category>
		<category><![CDATA[杀毒]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=402</guid>
		<description><![CDATA[看看了3.x的免ID升级服务器，感觉都是用这个脚本download下来的，他们都修改了update.ver文件的内容。 详细内容： #!/bin/bash ############################################## # CONFIGURATION ############################################## # system paths WGET="/usr/bin/wget" UNRAR="/usr/bin/unrar" PS="/bin/ps" MV="/bin/mv" RM="/bin/rm" MD5="/usr/bin/md5sum" # temporary path, must exist and be writeable TMP="/tmp" # clean-up old unused files :  0 - disable, 1 - enable-saves disk space clean_unused="0" # ESET updates server SERVERURL="u33.eset.com" # Local shared folder BASE="/var/shares/antivirus/nod32" # Username and password sent [...]]]></description>
			<content:encoded><![CDATA[<p>看看了3.x的免ID升级服务器，感觉都是用这个脚本download下来的，他们都修改了update.ver文件的内容。</p>
<p><span id="more-402"></span>详细内容：<br />
<code line="5" lang="shell">#!/bin/bash</p>
<p>##############################################<br />
# CONFIGURATION<br />
##############################################<br />
# system paths<br />
WGET="/usr/bin/wget"<br />
UNRAR="/usr/bin/unrar"<br />
PS="/bin/ps"<br />
MV="/bin/mv"<br />
RM="/bin/rm"<br />
MD5="/usr/bin/md5sum"</p>
<p># temporary path, must exist and be writeable<br />
TMP="/tmp"</p>
<p># clean-up old unused files :  0 - disable, 1 - enable-saves disk space<br />
clean_unused="0"</p>
<p># ESET updates server<br />
SERVERURL="u33.eset.com"</p>
<p># Local shared folder<br />
BASE="/var/shares/antivirus/nod32"</p>
<p># Username and password sent to you by e-mail from ESET<br />
USER="EAV-01234567"<br />
PASS="gej24i34j2"</p>
<p># What languages should be IGNORED (not downloaded)<br />
EXCLUDE_LANGUAGES=( fr ch nl ge jp pl pt sk sp hr hu )</p>
<p>##############################################<br />
# DO NOT EDIT BELOW THIS LINE<br />
##############################################</p>
<p># Functions, pre-checks</p>
<p>SERVERv3="http://$SERVERURL/eset_upd/"</p>
<p>function err_disp {<br />
if [ $? = 0 ];then<br />
:<br />
else<br />
echo $1<br />
exit 0<br />
fi<br />
}</p>
<p>function FilterLanguages {<br />
list=$(cat "$TMP/update.ver"|grep ".nup")<br />
for s in ${EXCLUDE_LANGUAGES[@]}; do<br />
list=$(echo "$list"|grep -v "$s.nup")<br />
done<br />
list=${list//"file="/""}<br />
echo "$list"<br />
}</p>
<p>if [ -f $TMP/nod32list ];then<br />
$RM -f $TMP/nod32list<br />
err_disp 'Failed while deleting old file'<br />
fi</p>
<p>if [ -f $TMP/v3.ver ];then<br />
$RM -f $TMP/v3.ver<br />
err_disp 'Failed while deleting old file'<br />
fi</p>
<p>${PS} aux|grep wget|grep "$SERVERURL" &gt;/dev/null 2&gt;&amp;1<br />
if [ $? = 0 ];then<br />
kill `ps aux|grep wget|grep "$SERVERURL"|awk '{print $2}'`<br />
err_disp 'Failed while killing process'<br />
fi</p>
<p>if [ ! -d ${BASE} ];then<br />
mkdir -p ${BASE}<br />
err_disp 'Failed while creating nod32 base home directiory'<br />
fi</p>
<p># Downloading the informational update files<br />
$WGET -t 9 -T 9 -nH -q -nd -O $TMP/v3.ver $SERVERv3/update.ver<br />
err_disp 'Failed while downloading update.ver v3'</p>
<p>$UNRAR x -inul $TMP/v3.ver $TMP<br />
echo "`FilterLanguages`" &gt;&gt; $TMP/nod32list</p>
<p>$RM $TMP/update.ver</p>
<p># Downloading the data files, adding/updating differences<br />
$WGET --http-user=$USER --http-passwd=$PASS -N -t 9 -T 9 -m -nH -P $BASE --input-file=$TMP/nod32list -B "http://$SERVERURL" --quiet</p>
<p>if [ $? = 0 ]; then<br />
$UNRAR p -inul $TMP/v3.ver | sed 's/\/download/download/' &gt; $BASE/update.ver<br />
fi</p>
<p># Cleaning old NUP datafiles<br />
if [ "$clean_unused" = "1" ]; then</p>
<p>if [ ! -f $TMP/nod32list ]; then<br />
exit 0<br />
fi</p>
<p>ARY=(`cat "$TMP/nod32list" | tr '\r' ' ' | tr '\n' ' '`)</p>
<p>if [ "${#ARY[@]}" -lt "10" ]; then<br />
exit 0<br />
fi</p>
<p>EFS=( )</p>
<p>filelist=`ls -1R "$BASE"`<br />
de=${#BASE}<br />
for s in $filelist; do<br />
if [ "${s:(-1)}" = ":" ]; then<br />
cdir=${s:($de)}<br />
cdir=${cdir:0:(${#cdir}-1)}<br />
else<br />
ext=${s:(-4)}<br />
if [ "$ext" = ".nup" ]; then<br />
EFS=( "${EFS[@]}" "$cdir/$s" )<br />
fi<br />
fi<br />
done</p>
<p># echo "Existing files: ${#EFS[@]}\nUplink files: ${#ARY[@]}\nCleaning..."</p>
<p>if [ "${#EFS[@]}" -lt "10" ]; then<br />
exit 0<br />
fi</p>
<p>function FindInArray {<br />
FOUND=0<br />
for s in ${ARY[@]}; do<br />
if [ "$s" = "$1" ]; then<br />
FOUND=1<br />
break<br />
fi<br />
done<br />
echo "$FOUND"<br />
}</p>
<p>for s in ${EFS[@]}; do<br />
FOUND=`FindInArray $s`<br />
if [ "$FOUND" = "0" ]; then<br />
rm "$BASE$s"<br />
fi<br />
done</p>
<p>fi</p>
<p>$RM -f $TMP/nod32list</code><br />
附件下载：<a href="http://www.wenzk.com/wp-content/uploads/2009/10/nodupdate.rar">nodupdate</a></p>
<p>载自：http://ashus.ashus.net/viewtopic.php?f=16&amp;t=68</p>
<p>我个人觉得这个脚本写的不怎么样，这个脚本没有对所有文件做完整性检查，每次运行这个脚本，完全依靠Wget来判断是否需要更新文件，所以在Nod32服务器上可以看到这些升级机器每次都搜刮一下所有文件。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1516" title="新安装Cacti遇到的几个问题">新安装Cacti遇到的几个问题</a> (0)</li><li><a href="http://www.wenzk.com/archives/1481" title="Linux PPPoE拨号频繁掉线问题">Linux PPPoE拨号频繁掉线问题</a> (0)</li><li><a href="http://www.wenzk.com/archives/1469" title="Linux下如何使用tar进行整系统备份["Ghost"]">Linux下如何使用tar进行整系统备份["Ghost"]</a> (0)</li><li><a href="http://www.wenzk.com/archives/1467" title="Linux下如何整系统备份/恢复">Linux下如何整系统备份/恢复</a> (0)</li><li><a href="http://www.wenzk.com/archives/1464" title="如何为逻辑卷创建镜像">如何为逻辑卷创建镜像</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/402/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

