Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
a new version of barnyard2 came out that fixed some things, but broke
portions of the script by accident.
  • Loading branch information
da667 committed Nov 21, 2016
1 parent 0194aaa commit c5a54c2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Autosnort - Ubuntu/AVATAR/autosnort-ubuntu-AVATAR.sh
Original file line number Diff line number Diff line change
Expand Up @@ -395,35 +395,36 @@ echo "sid_msg_version=2" >> pulledpork.tmp
echo "sid_changelog=/var/log/sid_changes.log" >> pulledpork.tmp
echo "sorule_path=$snort_basedir/snort_dynamicrules/" >> pulledpork.tmp
echo "snort_path=$snort_basedir/bin/snort" >> pulledpork.tmp
echo "snort_version=$snortver" >> pulledpork.tmp
echo "distro=Ubuntu-12-04" >> pulledpork.tmp
echo "config_path=$snort_basedir/etc/snort.conf" >> pulledpork.tmp
echo "black_list=$snort_basedir/rules/black_list.rules" >>pulledpork.tmp
echo "IPRVersion=$snort_basedir/rules/iplists" >>pulledpork.tmp
echo "ips_policy=security" >> pulledpork.tmp
echo "version=0.7.2" >> pulledpork.tmp
echo "version=0.7.3" >> pulledpork.tmp
cp pulledpork.tmp pulledpork.conf

#Run pulledpork. If the first rule download fails, we try again, and so on until there are no other snort rule tarballs to attempt to download.

cd /usr/src/pulledpork

print_status "Attempting to download rules for $snortver.."
perl pulledpork.pl -c /usr/src/pulledpork/etc/pulledpork.conf -vv &>> $logfile
perl pulledpork.pl -c /usr/src/pulledpork/etc/pulledpork.conf -W -vv &>> $logfile
if [ $? == 0 ]; then
pp_postprocessing
else
print_error "Rule download for $snortver has failed. Trying text-only rule download for $choice2.."
perl pulledpork.pl -S $choice2 -c /usr/src/pulledpork/etc/pulledpork.conf -T -vv &>> $logfile
perl pulledpork.pl -S $choice2 -c /usr/src/pulledpork/etc/pulledpork.conf -W -T -vv &>> $logfile
if [ $? == 0 ]; then
pp_postprocessing
else
print_error "Rule download for $choice2 has failed. Trying text-only rule download $choice3.."
perl pulledpork.pl -S $choice3 -c /usr/src/pulledpork/etc/pulledpork.conf -T -vv &>> $logfile
perl pulledpork.pl -S $choice3 -c /usr/src/pulledpork/etc/pulledpork.conf -W -T -vv &>> $logfile
if [ $? == 0 ]; then
pp_postprocessing
else
print_error "Rule download for $choice3 has failed. Trying text-only rule download for $choice4 (Final shot!)"
perl pulledpork.pl -S $choice4 -c /usr/src/pulledpork/etc/pulledpork.conf -T -vv &>> $logfile
perl pulledpork.pl -S $choice4 -c /usr/src/pulledpork/etc/pulledpork.conf -W -T -vv &>> $logfile
if [ $? == 0 ]; then
pp_postprocessing
else
Expand Down

0 comments on commit c5a54c2

Please sign in to comment.