Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Ah, yes, I should have been more careful with my numbers. And language. Hundreds of thousands of IPs have been banned but not by that script and thus not in that output; they were banned by another script that (guess what) hit ARIN and blocked the entire netblock. I don't want to do this too hastily (in other words, I don't wnat to do this automatically) so the automatic script is doing /32's. Since there is some interest in passing from someone (even if that interest is just stimulating a clarification), h
    • Okay, the code tags didn't do what I wanted... let's try pre! #!/usr/bin/perl use bigint; my $count = 0; while(my $ip = ) { chomp $ip; my $mask; ($ip, $mask) = $ip =~ m{block in (?:proto tcp )?quick from ([0-9.]+)/([0-9]+) to any} or print "can't parse: $ip\n"; next unless $ip and $mask; my $numhosts = 1 And then... #!/usr/bin/perl use IO::Handle; use POSIX; # process all bans for the recently passed out (10 minutes ago) my $timestamp = strftime "%b %e %H:", localtime(time() - 600); #