in reply to Automating Firewall Log Reporting
# switch to check if we've reached the topten list yet. my $topten = 0; my @ips; open REPORT, "reportfile" or die "Can't open reportfile: $!\n"; while (<REPORT>) { chomp; $topten = 1 if m!^Users/Source Addresses!; next unless $topten; push @ips, [ split /\s+/ ] if /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3 +})/; } close REPORT;
That's basically the gist of it. Every element in @ips is a reference to an anonymous array; the first element of the anonyous array is the ip address, the second element is that number thingy (whatever it signifies) and the third is the percentage.
For further study, look into MIME::Lite (for mailing) and Net::Whois (for you-know-what).
Of course, it would probably be easier to just modify the script that generates this output
Hope this helps,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (ar0n) Re: Automating Firewall Log Reporting
by dru145 (Friar) on Jul 18, 2001 at 20:36 UTC | |
by dru145 (Friar) on Jul 18, 2001 at 22:52 UTC |