#27257 - 2002-08-16 10:33 PM
[ I need help ] Symantec renamed their update files...
|
Rocco Capra
Hey THIS is FUN
   
Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
|
Here is an example of the script I use to download the norton AV files off the FTP server...
code:
BREAK ON ? "[ Start NAV Update Script... ]" IF @MONTHNO < 10 $MONTH = "0" + "@MONTHNO" ELSE $MONTH = "@MONTHNO" ENDIF IF @MDAYNO < 10 $DAY = "0" + "@MDAYNO" ELSE $DAY = "@MDAYNO" ENDIF $FILENAME = $MONTH + $DAY + "x86.exe" ? $FILENAME $NL = CHR(13) + CHR(10) $PATH = "C:\scripts\nav" ;========================================================== DEL "$PATH\ftp.txt" $RC = OPEN(1,"$PATH\ftp.txt",5) $RC = WRITELINE(1,"open ftp5.symantec.com" + $NL) $RC = WRITELINE(1,"anonymous" + $NL) $RC = WRITELINE(1,"me" + chr(64) + "mail.com" + $NL) $RC = WRITELINE(1,"cd public/english_us_canada/antivirus_definitions/norton_antivirus" + $NL) $RC = WRITELINE(1,"binary" + $NL) $RC = WRITELINE(1,"get $FILENAME" + $NL) $RC = WRITELINE(1,"quit" + $NL) $RC = CLOSE(1) ;========================================================== ? "[ Connecing to FTP Server ]" CD "C:\scripts\nav\_update\new" SHELL "C:\WINNT\System32\cmd.exe /C FTP -s:$PATH\ftp.txt" IF @ERROR <> 0 BEEP ? "SHELL failed with ERRORCODE : [" + @ERROR + "]" ENDIF CD "$PATH" ;========================================================== $RC = OPEN(2,"$PATH\getnav.log",5) $RC = WRITELINE(2,"==========================================" + $NL) $RC = WRITELINE(2,"[ @date ] " + "[ @time ]" + "[ $FILENAME ]" + $NL) $RC = WRITELINE(2,"==========================================" + $NL) $RC = CLOSE(2) ;========================================================== IF EXIST ("$PATH\_update\new\$FILENAME") ? "[ New File exists. Copying " + $FILENAME + " to Network ]" CALL "$PATH\copy.kix" GOTO END ELSE ? "[ No Update file for this session = $FILENAME ]" GOTO END ENDIF ;========================================================== :END ? "[ End NAV Update Script... ]" + $NL EXIT
But now since they started naming the files differently (since 08.12.02) "20020815-XXX-x86.exe" I cannot figure how to get the script to work right. The '-XXX-' part of the name changes as they modify the file and give it a revision number. Who knows how many times they will revise a file.
I tried this...
code:
$FILENAME = "@YEAR" + "$MONTH" + "$DAY" + "-*-x86.exe" (quotes needed to cast as string, otherwise the numbers are 'added')
But FTP.exe don't handle the '*' in there.
Any help will be greatly appreciated!!
Rocco
_________________________
I Love this board!!
--------------------
My DEV PC is running
KIX 4.22 WINXP Pro
|
|
Top
|
|
|
|
#27260 - 2002-08-21 03:39 PM
Re: [ I need help ] Symantec renamed their update files...
|
Rocco Capra
Hey THIS is FUN
   
Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
|
Here's what I did...
code:
BREAK ON $FILENAME = "symcdefsx86.exe" $PATH = @CURDIR ;[ ------------------------------------------------------------------------------ ] ? "[ Connecing to FTP Server ]"+@CRLF CD $PATH+"\_update\new" SHELL "%COMSPEC% /C FTP -s:"+$PATH+"\ftp.txt" IF @ERROR <> 0 BEEP ? "SHELL failed with ERRORCODE : [" + @ERROR + "]" ? @SERROR ENDIF CD "$PATH" ;[ ------------------------------------------------------------------------------ ] $NTIME = GetFileTime($PATH+"\_update\new\"+$FILENAME+"") $OTIME = GetFileTime($PATH+"\_update\"+$FILENAME+"") IF($NTIME > $OTIME) ? "[ Newer File exists. Copying "+$FILENAME+" to Network ]" CALL $PATH+"\copy.kix" GOTO END ELSE ? "[ No new Update file for this session = "+$FILENAME+" ]" GOTO END ENDIF ;[ ------------------------------------------------------------------------------ ] :END ? "[ End NAV Update Script... ]" + @CRLF $RC = OPEN(2,"$PATH\getnav.log",5) $RC = WRITELINE(2,"==================================================" + @CRLF) $RC = WRITELINE(2,"[ @date ] " + "[ @time ]" + "[ $FILENAME ]" + @CRLF) $RC = WRITELINE(2,"==================================================" + @CRLF) $RC = CLOSE(2) EXIT
fpt.txt...
code:
open ftp5.symantec.com anonymous me@mail.com cd public/english_us_canada/antivirus_definitions/norton_antivirus/static binary get symcdefsx86.exe quit
Login script...
code:
:NAV ? "[ Checking for AntiVirus Update ]" IF EXIST("C:\NAV") = 0 MD "C:\NAV" ENDIF $NAVFILE = Dir($SERVER+"\netlogon\_auxfiles\NAV\*x86.exe") $NTIME = GetFileTime($SERVER+"\netlogon\_auxfiles\NAV\"+$NAVFILE+"") $CTIME = ReadProfileString("C:\NAV\NAVUpdate.ini","VirusDefs","CUR") IF($NTIME > $CTIME) ? "[ Newer Definitions exists. Installing Definitions ]" RUN $SERVER+"\netlogon\_auxfiles\NAV\"+$NAVFILE+" /q" $RC = WriteProfileString("C:\NAV\NAVUpdate.ini","VirusDefs","OLD","$CTIME") $RC = WriteProfileString("C:\NAV\NAVUpdate.ini","VirusDefs","CUR","$NTIME") ELSE ? "[ No new Updates for this session ]" ENDIF
The FTP part runs twice daily(11:30pm & 1:30am) to check for a new file.
Rocco
_________________________
I Love this board!!
--------------------
My DEV PC is running
KIX 4.22 WINXP Pro
|
|
Top
|
|
|
|
#27268 - 2002-08-27 02:21 AM
Re: [ I need help ] Symantec renamed their update files...
|
Redback
Getting the hang of it
Registered: 2002-03-20
Posts: 71
Loc: Albury Wodonga, Australia
|
Doesnt NAVCE go and get the updates on its own?
It does on every site i have setup
|
|
Top
|
|
|
|
#27271 - 2002-08-27 04:28 AM
Re: [ I need help ] Symantec renamed their update files...
|
Les
KiX Master
   
Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
|
Reback, I believe Ron and Jens answered your question but hey, I gotta keep up my post count.
Yes NAV CE can be configured to automatically download the pattern via LiveUpdate, but that comes only once a week. IMHO, a week is a long time in virus years. Unlike Ron, I'd rather take my chances with a new VDB than risk waiting a week for a new pattern.
True, if a level 3 or greater threat comes out Symantec will release their LiveUpdate earlier, but I'd hate to be part of the level 3 statistic. Also, unlike Ron, who runs NAV corporate wide potentially affecting thousands of machines, I run a small divisional shop of 300 clients and can afford the risk of a pattern file shutting me down.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1110 anonymous users online.
|
|
|