Dear Walter

Put all this records in a file c:\test.log.and use this code. It will show
Ip Address as well as PORT Number.

----------------------------------------------------------------------------
------------------------------
open(READ,"c:\\test.log");

while(<READ>){
if(/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\.(\d+)\s/)
{
 print "Ip Address is $1 ";
 print "\t Port Nuber is$2 \n";
}

}
----------------------------------------------------------------------------
----------------------------------
With Best Regards
Raju

> ----------
> From:         walter valenti[SMTP:[EMAIL PROTECTED]]
> Sent:         Friday, September 21, 2001 8:23 PM
> To:   [EMAIL PROTECTED]
> Subject:      reg expr
> 
> How i can write a reg. expr for find the IP address in log file like:
> 
> 15:46:25.967683 194.244.46.38.1412 > 207.88.221.53.119: . ack 1115 win
> 8760 (DF)
> 15:46:26.600505 194.244.46.38.1412 > 207.88.221.53.119: P 15:21(6) ack
> 1115 win 8760 (DF)
> 15:46:26.600972 194.244.46.38.1412 > 207.88.221.53.119: F 21:21(0) ack
> 1115 win 8760 (DF)
> 15:46:26.604361 194.244.46.38.1412 > 207.88.221.53.119: R
> 14048899:14048899(0) win 0 (DF)
> 15:46:26.822313 207.88.221.53.119 > 194.244.46.38.1412: . ack 22 win
> 24820 (DF)
> 
> 
> P.S. A IP address is:   x.y.z.w  where x, y, z, w are numbers of one,
> two, three ciphers !!!
> The 5th number visible in the log file is the port.
> EX:
> 194.244.46.38 is IP address 1412 is the port
> 
> Thanks
> 
>     Walter
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to