[Snort-users] I have written a Linux shell script to detect missing rule files in your /etc/snort/snort.conf!

Teo En Ming teo.en.ming at ...11827...
Sat Apr 12 01:59:18 EDT 2014


===Start of Linux shell script===
#!/bin/sh
# Linux shell script: detect-missing-snort-rule-files.sh
# Written by: Teo En Ming
# Email: teo.en.ming at ...11827...
# Date: 12 April 2014 Saturday 1:00 P.M. Singapore Time
# Version: 1.0
#
# This program detects missing rule files in your /etc/snort/snort.conf
configuration file.
#

RULE_PATH=/etc/snort/rules
SNORT_CONF=/etc/snort/snort.conf

cd $RULE_PATH

for i in `ls -1 $RULE_PATH`
do
    grep "^include \$RULE_PATH/$i" $SNORT_CONF > /dev/null
    if [ $? -ne 0 ]
    then
        echo "$i not included in $SNORT_CONF!"
    fi
done
===End of Linux shell script===
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20140412/b39c8c30/attachment.html>


More information about the Snort-users mailing list