Skip to content

Instantly share code, notes, and snippets.

/gist:62723
Created Feb 12, 2009

Embed
What would you like to do?
echo "outbound TCP connection 8051992 for dmz:192.168.10.223/21 (192.168.10.223/21) to servers:192.168.1.70/2037 (192.168.1.70/2037)" | perl -le 'while($line=<STDIN>){ if($line=~m/^inbound|outbound\s+(TCP|UDP|ICMP)\s+connection\s+[0-9]+\s+for\s+([A-Za-z]+):([0-9\.]+)\/([0-9]+) .*to.* ([A-Za-z]+):([0-9\.]+)\/([0-9]+).*/){ print "$1 $2 $3 $4 $5 $6 $7\n";}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.