mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 20:42:11 +00:00
Update update.sh
Download rules via URL
This commit is contained in:
parent
8abd1be5bb
commit
dceaa984c9
1 changed files with 17 additions and 0 deletions
17
docker/suricata/dist/update.sh
vendored
17
docker/suricata/dist/update.sh
vendored
|
@ -40,3 +40,20 @@ if [ "$myCHECK" == "0" ];
|
||||||
else
|
else
|
||||||
echo "/etc/suricata/null.bpf"
|
echo "/etc/suricata/null.bpf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Download rules via URL
|
||||||
|
if [ "$FROMURL" != "" ] ; then
|
||||||
|
SAVEIFS=$IFS ; IFS='|'
|
||||||
|
for URL in $FROMURL; do
|
||||||
|
if [ $(curl -I --silent --output /dev/null --write-out "%{http_code}" $URL) -eq 200 ] ; then
|
||||||
|
rm -rf /tmp/*
|
||||||
|
curl "$URL" -o /tmp/rules.tar.gz
|
||||||
|
tar -xvf /tmp/rules.tar.gz -C /tmp
|
||||||
|
suricata-update --local /tmp/rules --no-test
|
||||||
|
rm -rf /tmp/*
|
||||||
|
else
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$SAVEIFS
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue