Postman Pat wrote:
> 
> Greetings gurus,

Hello,

> I have the following line from a PIX log:
> <163>Jun 12 2002 23:55:26: %PIX-3-106011: Deny inbound (No xlate) tcp src
> inside:192.14.32.44/1401 dst dmz:10.0.0.16/80 <166>Jun 12 2002 23:55:31: %
> PIX-6-302005: Built UDP connection for faddr 196.7.0.138/1 gaddr
> 196.77.45.3/1425 laddr 196.77.45.3/1425
> 
> What I want to do is take the src address and create a hash key using the
> IP address of the src. For instance I have: my %hash;
> 
> Now I want to take this line & create a key and add 1 to it ie: $hash
> {192.14.32.44}++;
> 
> Same as the faddr field on the second line...


while ( <FILE> ) {
    $src{$1}++ if /tcp src inside:([\d.]+)/;
    $faddr{$1}++ if /faddr ([\d.]+)/;
    }



John
-- 
use Perl;
program
fulfillment

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

Reply via email to