1;30Nov2001;17:08:25;192.168.1.2;log;accept;;hme0;outbound;udp;192.168.86.6;20.248.36.99;domain-udp;1103;63;85;;;;;;;;;;;;;;; 2;30Nov2001;17:08:25;192.168.1.2;log;drop;;hme0;inbound;tcp;63.28.96.254;192.168.11.67;netbios-ssn;18803;48;89;;;;;;;;;;;;;;; 3;30Nov2001;17:08:26;192.168.1.2;log;drop;;hme0;inbound;tcp;65.93.20.223;192.168.26.139;auth;1323;60;89;;;;;;;;;;;;;;; 4;30Nov2001;17:08:26;192.168.1.2;log;drop;;hme0;inbound;tcp;65.93.22.223;192.168.26.139;auth;1323;60;89;;;;;;;;;;;;;;; 5;30Nov2001;17:08:26;192.168.1.2;log;accept;;qfe2;inbound;tcp;192.168.86.146;20.248.36.97;http;4719;44;85;;;;;;;;;;;;;;; 6;30Nov2001;17:08:26;192.168.1.2;log;accept;;hme0;outbound;tcp;192.168.86.146;204.48.36.97;http;4719;44;85;;;;;;;;;;;;;;; 7;30Nov2001;17:08:26;192.168.1.2;log;accept;;qfe2;inbound;tcp;192.168.86.146;204.48.36.97;http;4721;44;85;;;;;;;;;;;;;;; 8;30Nov2001;17:08:26;192.168.1.2;log;accept;;hme0;outbound;tcp;192.168.86.146;24.248.36.97;http;4721;44;85;;;;;;;;;;;;;;; 8;30Nov2001;17:08:26;192.168.1.2;log;accept;;hme0;outbound;tcp;192.168.86.146;20.248.36.97;http;4721;44;85;;;;;;;;;;;;;;; 9;30Nov2001;17:08:26;192.168.1.2;log;accept;;qfe2;inbound;tcp;192.168.27.154;205.18.145.185;http;4396;44;85;;;;;;;;;;;;;;; 10;30Nov2001;17:08:26;192.168.1.2;log;accept;;hme0;outbound;tcp;192.168.27.154;25.188.145.185;http;4396;44;85;;;;;;;;;;;;;;; 11;30Nov2001;17:08:26;192.168.1.2;log;accept;;qfe2;inbound;tcp;192.168.27.154;205.88.145.185;http;4397;44;85;;;;;;;;;;;;;;; 12;30Nov2001;17:08:26;192.168.1.2;log;accept;;hme0;outbound;tcp;192.168.27.154;205.188.45.185;http;4397;44;85;;;;;;;;;;;;;;; #### #!/usr/bin/perl -w use strict; my $log = './log'; my @data; # Open the firewall log file and create new array containing all of the data. open (LOG, $log) or die "Can't open $log: $!"; while (){ push (@data, "$_"); } # Split the @data array into separate arrays by category. my (@dst, @service); foreach (@data) { my @lines=split "\n",$_; foreach(@lines){ my ($num,$date,$time,$fw,$type,$action,$alert,$int,$dir,$proto,$src,$dst,$service,$sport,$len,$rule) = (split /;/,$_); push(@dst, $dst); push(@service, $service); } }