#!/usr/bin/perl while (chomp($a=)) { $input=$a; $a=~ (/SRC./); $b=$'; $b=~ /DST./; $ip=$`; #system "host $ip"; open (HOST, "host $ip|"); chomp ($a=); if ($a=~ /pointer/) { $host=$'; } else { $host="- $ip -" } $input=~ /DPT./; $a=$'; $a=~ /WIN/; $port=$`; $input=~ /linux/; $time=$`; #print "$ip $host $port $time"; #print "\n"; write; } format STDOUT = | @<<<<<<<<<<<<<< | @<<<<<<<<<<<<<<<< | @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | @<<<< | $time, $ip, $host, $port . format STDOUT_TOP = Ar. Sel. = @<< $% +-----------------+-------------------+------------------------------------------------------------------+-------+ | Date | IP | Hostname | Port | +-----------------+-------------------+------------------------------------------------------------------+-------+ .