Page 1 of 1 1
Topic Options
#27257 - 2002-08-16 10:33 PM [ I need help ] Symantec renamed their update files...
Rocco Capra Offline
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. [Roll Eyes]

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. [Mad]

Any help will be greatly appreciated!!

Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#27258 - 2002-08-16 10:45 PM Re: [ I need help ] Symantec renamed their update files...
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You might want to take a look at this script: NAV Pattern FTP Script RFC
_________________________
There are two types of vessels, submarines and targets.

Top
#27259 - 2002-08-17 04:32 AM Re: [ I need help ] Symantec renamed their update files...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Yeah, I found that downloading the .VDB file was the easiest. You don't mention what version of NAV. The script I have in the thread Jens points to was written for NAV CE 7.61 and downloads to the parent server. From there, NAV CE takes over the distribution to all the managed clients. You can copy the .VDB to unmanaged clients.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#27260 - 2002-08-21 03:39 PM Re: [ I need help ] Symantec renamed their update files...
Rocco Capra Offline
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
#27261 - 2002-08-21 03:42 PM Re: [ I need help ] Symantec renamed their update files...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
twice daily?
huh, I've set mine to update 3 times per week.
_________________________
!

download KiXnet

Top
#27262 - 2002-08-21 03:53 PM Re: [ I need help ] Symantec renamed their update files...
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
I haven't quite figured out how often they update that file. I suppose I could knockit down to once a day.

Rocco

Oh yeah, sorry, I missed this till now...
Version = NAVCE 7.5/7.6
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#27263 - 2002-08-23 05:11 PM Re: [ I need help ] Symantec renamed their update files...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Rocco,
Take a look at my script. It checks for a new VDB file which is always unique. I check four times a day. The VDB is also a smaller download and does not need to be extracted.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#27264 - 2002-08-26 02:37 PM Re: [ I need help ] Symantec renamed their update files...
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
Les,

You say that all I have to do is copy the vdb file to the right place on the clients and that's it? NAV know's what to do with it?

Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#27265 - 2002-08-26 03:28 PM Re: [ I need help ] Symantec renamed their update files...
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
If I understand it correctly he's using that file to determine whether there are new definitions available. I believe you still have to download the file and distribute it to NAV CE computers.
_________________________
There are two types of vessels, submarines and targets.

Top
#27266 - 2002-08-26 10:47 PM Re: [ I need help ] Symantec renamed their update files...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Rocco,
I download the VDB file to my NAV parent and it takes care of the distribution to all managed clients.  You may optionally want to distribute via script to unmanaged clients.

On the NAV parent, just copy to VPHOME (C:\Program Files\NAV\ in my case).  On unmanaged clients, the location depends on OS.  The parent knows what to do with it.

For Win2k it is C:\Documents and Settings\All Users\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5\ but I'm sure you can figure out the others.  There too, the client knows what to do with it.

Jens,
I do rely on the VDB filename to ascertain the version to first see if I should download it.  I then download the most recent VDB file to VPHOME.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#27267 - 2002-08-26 11:40 PM Re: [ I need help ] Symantec renamed their update files...
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Les:

I just took an educated guess since I'm not running NAV CE (unfortunately).
_________________________
There are two types of vessels, submarines and targets.

Top
#27268 - 2002-08-27 02:21 AM Re: [ I need help ] Symantec renamed their update files...
Redback Offline
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
#27269 - 2002-08-27 02:25 AM Re: [ I need help ] Symantec renamed their update files...
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Yes it does, but not as regular. I consider checking for updates multiple times a day a necessity which NAV CE AFAIK doesn't do.
_________________________
There are two types of vessels, submarines and targets.

Top
#27270 - 2002-08-27 02:30 AM Re: [ I need help ] Symantec renamed their update files...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Yes Reback it can if you set it up to do that.

However, being more careful... it is better to manually download and test on a system or two before deploying automatically to all your systems. If Symantec were to push out a bad def (Heaven forbid) it may be possible to bring your entire organization to a screeching halt within minutes. ie. what if it were some kind of dat that was locking up network connectivity... you would have to VISIT every desktop and server to go repair it. Could your support team handle that kind of an issue? i.e. it has the potential of being more dangerous then a real virus. Testing a few in advance with a reboot as well should hopefully prevent something like that from happening to all your systems at once.

Top
#27271 - 2002-08-27 04:28 AM Re: [ I need help ] Symantec renamed their update files...
Les Offline
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
#27272 - 2002-08-27 01:52 PM Re: [ I need help ] Symantec renamed their update files...
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
Thanks Les!

Thanks All for your comments!!

I love this board!!!

Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1110 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.067 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org