2011-06-22 05:45:27 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Snort < Formula
|
|
|
|
homepage 'http://www.snort.org'
|
2012-05-16 17:46:21 +00:00
|
|
|
url 'http://www.snort.org/dl/snort-current/snort-2.9.2.3.tar.gz'
|
|
|
|
md5 '9ddb26005d864577fca66a9a1cdfdc8a'
|
2011-06-22 05:45:27 +00:00
|
|
|
|
|
|
|
depends_on 'daq'
|
|
|
|
depends_on 'libdnet'
|
|
|
|
depends_on 'pcre'
|
|
|
|
|
2012-05-15 03:18:46 +00:00
|
|
|
def options
|
|
|
|
[['--enable-debug', "Compile Snort with --enable-debug and --enable-debug-msgs"]]
|
|
|
|
end
|
|
|
|
|
2011-06-22 05:45:27 +00:00
|
|
|
def install
|
2012-05-15 03:18:46 +00:00
|
|
|
args = %W[--prefix=#{prefix}
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--enable-ipv6
|
|
|
|
--enable-gre
|
|
|
|
--enable-mpls
|
|
|
|
--enable-targetbased
|
|
|
|
--enable-decoder-preprocessor-rules
|
|
|
|
--enable-ppm
|
|
|
|
--enable-perfprofiling
|
|
|
|
--enable-zlib
|
|
|
|
--enable-active-response
|
|
|
|
--enable-normalizer
|
|
|
|
--enable-reload
|
|
|
|
--enable-react
|
|
|
|
--enable-flexresp3]
|
|
|
|
|
|
|
|
if ARGV.include?('--enable-debug')
|
|
|
|
args << "--enable-debug"
|
|
|
|
args << "--enable-debug-msgs"
|
|
|
|
else
|
|
|
|
args << "--disable-debug"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
2011-06-22 05:45:27 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
<<-EOS.undent
|
|
|
|
For snort to be functional, you need to update the permissions for /dev/bpf*
|
|
|
|
so that they can be read by non-root users. This can be done manually using:
|
|
|
|
sudo chmod 644 /dev/bpf*
|
|
|
|
or you could create a startup item to do this for you.
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|