Sha256: e680fdaf13efbc1d07f4805c508cf06c2957e9d0fac52490346b91298bf8dedf

Contents?: true

Size: 678 Bytes

Versions: 1

Compression:

Stored size: 678 Bytes

Contents

#!/usr/bin/env ruby

require 'bundler/setup'
require 'suricata/surilizer'

def usage(prognam)
	puts "Usage: #{prognam} <fast.log | fast.log.gz | fast.log fast.log.1.gz fast.log2.gz fast3.log>"
	exit 0
end

begin
usage($PROGRAM_NAME) if ARGV.length == 0
	surilizer = Suricata::Surilizer.new()

	ARGV.each do |f|
		if f =~ /.*.gz$/
			Zlib::GzipReader.open(f) {|gz|
				  surilizer.logfile = Suricata::Logfile.new(nil,false,gz)
				  surilizer.analyze
				  surilizer.logfile.close
			}
		else
			surilizer.logfile = Suricata::Logfile.new(f)
			surilizer.analyze
			surilizer.logfile.close
		end
	end
	surilizer.result
rescue Errno::ENOENT => e
	puts "#{e.message}\n"
	exit 1
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
suricata-0.3.1 exe/surilizer.rb