my $entry = 'Sep 26 17:05:11 pixfw.testsec.org %PIX-3-106010: Deny inbound 
protocol 12 src outside:123.97.104.117 dst intf2:192.168.50.10';

chomp($entry);
my ($date_stuff, $min, $sec, $info, $IP1, $IP2) = split(/:/, $entry);
$date_stuff .= ":$min:$sec";

#print" ($date_stuff\n $info\n $IP1\n $IP2\n";
my ($mon, $day, $time, $machine, $dev) = split(/ /, $date_stuff);
my $IP1_name = "unknown";
$IP1_name = $1
  if ($info =~ s/(?:src|dst)\s+\w+$//);
my $IP2_name = "unknown";
$IP2_name = $1
  if ($IP1 =~ s/(src|dst\s+\w+)$//);

printf("On %s %02d %s at machine %s interface %s (ip: %s) saw '%s' from %s 
(ip:%s)\n",
     $mon, $day, $time, $machine, $IP2_name, $IP2,  $info, $IP1_name, 
$IP1);

a

Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED] 
VOICE: (608) 261-5738  FAX 264-5932

" History will have to record that the greatest tragedy of this period of
social transition was not the strident clamor of the bad people, but the
appalling silence of the good people. "
Martin Luther King, Jr.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to