Hi,

Don't know if Pete ever incorporated my update into the tool package at the
Sniffer site but..... I mailed them some changes to the default script they
had where I had a few "constant" definitions at the beginning of the script.
In stead of everybody needing to do a "find and replace" you just fill in
the right code.

I also do a comp to test is the new file is different. I log that info to
see if my update frequency, every 4 hours, is still good.

So I start of with a few lines like:
SET IDNAME=xyz1234
SET AUTHCODE=abc5678

And then later on use:
[....]
rem The check utility gets the ID from the name but it ignores the
rem extension so we'll rename it for the test.
rename sniffer.new %IDNAME%.tst

rem Now we need to test the file and check our error level. If the
rem check fails we'll skip to the end
snf2check.exe %IDNAME%.tst %AUTHCODE%
if errorlevel 1 goto Done

echo New File Tested GOOD!
rem Next let's see if the rulefile changed at all
comp /D %IDNAME%.tst %IDNAME%.snf < No.txt > comp.txt
find "Files compare OK" comp.txt > nul
if errorlevel 1 goto Replace
rem Some logging here
goto Done

:Replace
rem If we didn't fail then we can go ahead and make the switch.
if exist %IDNAME%.old del %IDNAME%.old
rename %IDNAME%.snf %IDNAME%.old
rename %IDNAME%.tst %IDNAME%.snf
[....]



Groetjes,

Bonno Bloksma


----- Original Message ----- 
From: "Landry William" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 28, 2004 8:48 AM
Subject: RE: Re[2]: [sniffer] 2-3.0i9 looks good to me... How about you?


>
> Here is what I've been using for several months now, compiled from the
> original Sniffer autosnf.cmd file and suggestions found on this list:
> =====
> rem First, get the updated rules file from the web site.
>
> wget -N http://www.sortmonster.net/Sniffer/Updates/rulebase.snf -O
> rulebase.new.gz --header=Accept-Encoding:gzip --http-user=sniffer
> --http-passwd=ki11sp8m -o snfupd.txt
>
> rem Uncompress the rulebase file.
>
> gzip -d -f rulebase.new.gz
>
> rem If that worked, then there will be a sniffer.new file.
>
> if exist rulebase.new goto Replace
>
> rem If the above test fails, then we skip to the end of the file
> rem and take no further action. Everything stays as it is.
>
> goto Done
>
> rem If the test didn't fail we'll replace our file.
>
> :Replace
>
> rem The check utility gets the ID from the name but it ignores the
> rem extension so we'll rename it for the test.
>
> rename rulebase.new rulebase.tst
>
> rem Now we need to test the file and check our error level. If the
> rem check fails we'll skip to the end
>
> snf2check.exe rulebase.tst license-id
> if errorlevel 1 goto Done
>
> echo New File Tested GOOD!
>
> rem If we didn't fail then we can go ahead and make the switch.
>
> if exist rulebase.old del rulebase.old
> rename rulebase.snf rulebase.old
> rename rulebase.tst rulebase.snf
>
> rem Handle any additional successful system updates here (before Done).
>
> :Done
>
> rem If things went well we're all ok.
> rem If something went wrong then we'll do a bit of cleanup.
>
> if exist rulebase.tst del rulebase.tst
> =====
>

---
[E-mail scanned at tio.nl for viruses by Declude Virus]


This E-Mail came from the Message Sniffer mailing list. For information and 
(un)subscription instructions go to 
http://www.sortmonster.com/MessageSniffer/Help/Help.html

Reply via email to