Snortattack is a bash shell script that is designed to make the installation of snort in inline mode on Fedora or Debian as easy as possible.
ca60def0dfed32d507934b45e9e9e6993662431d2b1c7cab8d92e45057fd1320
#!/bin/sh
#
# MetU
# Feb. 2006
# <metu@snortattack.org>
#
# ____ _ _ _ _ ___
# / ___| _ __ ___ _ __| |_ __ _| |_| |_ __ _ ___| | __ / _ \ _ __ __ _
# \___ \| '_ \ / _ \| '__| __/ _` | __| __/ _` |/ __| |/ /| | | | '__/ _` |
# ___) | | | | (_) | | | || (_| | |_| || (_| | (__| < | |_| | | | (_| |
# |____/|_| |_|\___/|_| \__\__,_|\__|\__\__,_|\___|_|\_(_)___/|_| \__, |
# |___/
# Download current snortattack packages
# Query Server for current list
#
# List queried from server
#
SA_DISTRO="deb"
# SA_DISTRO :
# Selezionate la distribuzione, Select Distro
#
# "deb" (Debian)
# "fc20" (Fedora Core 2)
# "fc30" (Fedora Core 3)
# "fc40" (Fedora Core 4)
#
# Embedded ips love fc20
#
SA_DIR_ROOT="/root/snortattack"
# SA_DIR_ROOT :
# ita: Impostare la directory dove i pacchetti verranno scaricati
# eng: Select the path of download
# default /root/snortattack/
#
SA_SERVER="www.snortattack.altervista.org"
# SA_SERVER :
#
# Selezionate il Server da cui scaricare i pacchetti
# Il server di default e' www.snortattack.altervista.org
# Visita la sezione mirror sul sito per la lista dei mirror
# La selezione del mirror e' obbligatoria per il download dei pacchetti.
#
# Select the mirror from the mirror list in www.snortattack.org
# The default mirror is www.snortattack.altervista.org is a good mirror
# please support us and go to visit www.snortattack.altervista.org
LANG="ita"
# LANG:
#
# Selezionate Select language
#
# "ita" (per la lngua italiana)
# "eng" (for english language)
#
# Default "ita"
# La selezione della lingua e' obbligatoria per lo svolgimento dello script
#
# Select the language for english change LANG="eng"
# non modificare il codice qui sotto:
# not change below:
### Variabili di sistema / System Variable ###
VERSION="current"
# Download the current or another list (for development by admin)
# Select "currentdev" for the test lists.
SA_LIST="http://www.snortattack.org/files/info/$VERSION/$LANG/${SA_DISTRO}/current.txt"
SA_PACKAGES=`wget -q -O - ${SA_LIST}`
############################
# se la directory non esiste la creo :
# if exist create directory
if [ ! -d $SA_DIR_ROOT ] ; then
mkdir -p $SA_DIR_ROOT
fi
cd $SA_DIR_ROOT
# se la lista non e' disponibile esco
# if list unavailable, exit. please check your connection.
if [ -z "${SA_PACKAGES}" ] ; then
echo "La lista dei pacchetti non e' disponibile, controlla la tua connessione. List unavailable, please check your connection"
rm -rf $SA_DIR_ROOT
exit 1
fi
# se la lista e' disponibile comincio il download
# if list is ok start download
for ATTACK in ${SA_PACKAGES} ; do
echo "Downloading ${ATTACK}"
wget http://${SA_SERVER}/files/info/download/$LANG/${SA_DISTRO}/${ATTACK}
echo ""
sleep 4
done
if [ ! -d $SA_DIR_ROOT ]; then
if [ $LANG = eng ]; then
echo " "
echo "Download failed"
_OK="ko"
fi
if [ $LANG = ita ]; then
echo " "
echo "Download Fallito"
_OK="ko"
fi
else
if [ $LANG = eng ]; then
echo " "
echo "Download ok"
_OK="ok"
fi
if [ $LANG = ita ]; then
echo " "
echo "Download ok"
_OK="ok"
fi
fi
echo " "
echo "MetU"
echo "Feb. 2006"
echo "metu@snortattack.org"
echo " "
if [ $_OK = ok ]; then
if [ $LANG = ita ]; then
echo "per installare vedi $SA_DIR_ROOT/fast_inline.sh"
else
echo "for install see $SA_DIR_ROOT/fast_inline.sh"
fi
else
if [ $LANG = ita ]; then
echo "Prova a controllare le variabili : distro= $SA_DISTRO mirror= $SA_SERVER lingua= $LANG "
else
echo "Try to setup the variable : distro= $SA_DISTRO mirror= $SA_SERVER language= $LANG "
fi
fi
echo " "
exit 0
# This script is based from the current qmail toaster script. thanx to Erik A. Espinoza
# MetU