12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- @ECHO OFF
- SETLOCAL
-
-
- SET SNIFFER_PATH=c:\SNF
- SET AUTHENTICATION=authenticationxx
- SET LICENSE_ID=licensid
-
-
- CD /d %SNIFFER_PATH%
-
- echo Running SNF getRulebase.cmd > getRulebase.txt
-
- if not exist UpdateReady.txt echo No UpdateReady.txt >> getRulebase.txt
- if not exist UpdateReady.txt goto DONE
-
-
-
-
-
-
-
-
-
-
- :DOWNLOAD
-
- copy UpdateReady.txt UpdateReady.lck > nul
-
- if exist %LICENSE_ID%.new del %LICENSE_ID%.new
-
- echo.
-
- curl -v "http://www.sortmonster.net/Sniffer/Updates/%LICENSE_ID%.snf" -o %LICENSE_ID%.new -s -S -R -z %LICENSE_ID%.snf -H "Accept-Encoding:gzip" --compressed -u sniffer:ki11sp8m 2>> getRulebase.txt
-
- if %ERRORLEVEL% NEQ 0 del %LICENSE_ID%.new 2> nul
- if not exist %LICENSE_ID%.new echo New rulebase file NOT downloaded >> getRulebase.txt
- if not exist %LICENSE_ID%.new goto CLEANUP
-
- snf2check.exe %LICENSE_ID%.new %AUTHENTICATION% 2>> getRulebase.txt
-
- if errorlevel 1 goto CLEANUP
-
- echo New rulebase file tested OK >> getRulebase.txt
-
- if exist %LICENSE_ID%.old del %LICENSE_ID%.old
- if exist %LICENSE_ID%.snf rename %LICENSE_ID%.snf %LICENSE_ID%.old
- rename %LICENSE_ID%.new %LICENSE_ID%.snf
-
- if exist UpdateReady.txt del UpdateReady.txt
- if exist UpdateReady.lck del UpdateReady.lck
-
- :CLEANUP
-
- if exist %LICENSE_ID%.new del %LICENSE_ID%.new
- if exist UpdateReady.lck del UpdateReady.lck
-
- :DONE
-
- echo Done >> getRulebase.txt
-
-
-
- ENDLOCAL
|