----- Original Message -----
From: "Jerry Murdock" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 6:53 PM
Subject: [Declude.Virus] McAfee Daily DAT Command Line Scanner Update Script

> As requested a few times, attached is a script to update the engine and dat
> files for a command line install of McAfee.
>
> I was hesitant to post, and it comes with some limitations and warnings:
>
> NAI considers the daily dat files BETA quality
>
> NAI could change sdat behavior at any time.  See notes in the file.
>
> It is NOT designed to update a running Netshield, but can be modified to do
> so.  See notes in the file.
>
> It is more wget version dependent than I'd like.  For easier deployment, this
> version uses MS find.exe instead of grep(requiring a change in my search
> string). To use with MS find instead of grep, pay attention to wget version
> and use the appropriate switches.
>
> As always, use at your own risk.  It works for my personal purposes, but could
> cause loss of data or worse on your systems.
>
> Jerry

 
The archived version of the original post shows the attachment in-line and wraps some of the lines.
 
There is no change in the script, only posted via HTML to to prevent wrapping in the archive, along with an attached zip file of the same.
 
Jerry
 
:=====  BEGIN CUT HERE =====
 
rem Updates a Mcafee *! COMMAND LINE !* scanner installation  with latest
rem engine and daily dat files.
 
rem WARNING:
rem NAI considers the daily dat files BETA quality.  Use at your own risk.
 
rem WARNING:
rem NAI could change the behavior of the SuperDAT packages at any time,
rem rendering this script useless or even dangerous.
 
rem WARNING:
rem This is *NOT* designed to update a running on-access/real-time scanner 
rem installation. If using Netshield or VirusScan on-access/real-time
rem scanners, create a separate directory for the command line functionality.
rem
rem Alternatively, it is possible to use the same techniques to automate
rem updating of the real-time Netshield/VirusScan.  Get SDATDAILY.exe instead
rem of DAILIYDAT.ZIP, and look at the sdat command line switches to install
rem the sdat(s) silently. Proceed with caution, and test all possible
rem scenarios.  An SDAT updating a running Netshield may want to reboot (more
rem likely for the "release" sdat41## file, probably not an issue for
rem sdatdaily).  Proceed with caution.
 
rem Requires info-zip's unzip.exe 5.42 www.info-zip.org
rem Requires gnu wget, links to Windows binaries at www.cygwin.com or
rem www.wget.org
rem
rem NOTE command line change for wget 1.8 or greater!
 
rem This script is distributed in the hope that it will be useful,
rem but WITHOUT ANY WARRANTY; without even the implied warranty of
rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
rem
rem USE AT YOUR OWN RISK!
 
SETLOCAL
 
:Set Path Info
SET scandrv=f:
SET scandir=\vscan\McAfee
SET DownloadDir=%scandrv%%scandir%\update
SET SDATLog=%DownloadDir%\SDAT.LOG
 
:Set Unzip Command Info
SET unzipcmd=UNZIP -o -u
SET unziptail=-d %scandrv%%scandir%
 
:CheckDirectories
md %scandrv%%scandir%
md %DownloadDir%
if not exist %DownloadDir% goto end
 
:Set FTP Info
 
:FOR WGET 1.7  !*************************************************!
SET wgetcmd=c:\cygwin\bin\wget.exe
 
:FOR WGET 1.8 OR GREATER  !**************************************!
:SET wgetcmd=c:\cygwin\bin\wget.exe --progress=dot
 
SET SDATURL=ftp://ftp.nai.com/pub/antivirus/datfiles/4.x/sdat*.exe
SET DDATURL=http://download.nai.com/products/mcafee-avert/daily_dats/DAILYDAT.ZIP
 
SET NewSDAT=1
SET NewDDAT=1
 
:FTPDownload
%wgetcmd% -t 2 -N -P %DownloadDir% %SDATURL% 2>&1 | find "100%%"
if errorlevel 1 SET NewSDAT=0
 
%wgetcmd% -t 2 -N -P %DownloadDir% %DDATURL% 2>&1 | find "100%%"
if errorlevel 1 SET NewDDAT=0
 
if %NewSDAT%==1 goto ProcessSDAT
if %NewDDAT%==1 %unzipcmd% %DownloadDir%\DAILYDAT.zip %unziptail%
goto end
 
:ProcessSDAT
SET T=0
for /F %%I in ('dir %DownloadDir%\sdat4*.exe /a-d-s /b /o:-n') do call :RunSDAT %DownloadDir%\%%I
%unzipcmd% %DownloadDir%\DAILYDAT.zip %unziptail%
del %SDATLog%
goto END
 
:RunSDAT
SET /a T = 1+%T%
if %T% EQU 1 start /wait %1 -logfile %SDATLog% -e %scandrv%%scandir%
if %T% LEQ 3 goto :RunSDAT_exit
if exist %1 del /F %1 
:RunSDAT_exit
goto :EOF
 
:END
ENDLOCAL
:=====  END CUT HERE =====

Attachment: updmcafee.zip
Description: Binary data

Reply via email to