rendered paste body@echo off
SET rules=snortrules-pr-2.4
:start
if not exist "C:\Program Files\WinPcap\rpcapd.exe" goto winpcap
if not exist "C:\Snort\bin\snort.exe" goto snortinstall
Echo Downloading Rules form snort.org
echo ***********************************************
echo * SNORT.ORG ONLY LETS YOU DOWNLOAD THIS FILE ONCES DONT LOSE IT !
echo ***********************************************
ping 1.1.1.1 > %temp%\null
wget -O %rules%.tar.gz http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_pr/%rules%.tar.gz
7z.exe x -y %rules%.tar.gz
7z.exe x -y -oc:\snort %rules%.tar
Echo Downloading Rules form bleedingsnort.com
ping 1.1.1.1 > %temp%\null
wget -O bleeding-all.rules http://www.bleedingsnort.com/bleeding-all.rules
move /Y bleeding-all.rules c:\snort\rules
goto end
:winpcap
cls
echo WinPcap is not installed in C:\Program Files\WinPcap downloading ...
ping 1.1.1.1 > %temp%\null
wget http://www.winpcap.org/install/bin/WinPcap_3_1.exe
start /w WinPcap_3_1.exe
goto start
:snortinstall
cls
echo Snort is not installed in c:\snort downloading ...
ping 1.1.1.1 > %temp%\null
wget http://www.snort.org/dl/binaries/win32/Snort_2_6_0_2_Installer.exe
start /w Snort_2_6_0_2_Installer.exe
copy start.bat c:\snort\bin
goto start
:end
start c:\snort\bin\
@echo off
echo logs/alerts are in c:\snort\logs
snort -i 2 -q -l ../log -c ../etc/snort.conf