ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/myhttpd/netgeo.pl
(Generate patch)

Comparing Coro/myhttpd/netgeo.pl (file contents):
Revision 1.15 by root, Wed May 7 19:00:43 2003 UTC vs.
Revision 1.16 by root, Sat Sep 17 20:21:11 2005 UTC

120sub ip_request { 120sub ip_request {
121 my ($self, $ip) = @_; 121 my ($self, $ip) = @_;
122 122
123 my $whois = $self->whois_request($ip); 123 my $whois = $self->whois_request($ip);
124 124
125 return () if $whois =~ /^No match/; 125 return if $whois =~ /^No match/;
126 return if $whois =~ /^\*de: This network range is not allocated to /; # APINIC e.g. 24.0.0.0
126 127
127 if ($whois =~ /^To single out one record/m) { 128 if ($whois =~ /^To single out one record/m) {
128 my $handle; 129 my $handle;
129 while ($whois =~ /\G\S.*\(([A-Z0-9\-]+)\).*\n/mg) { 130 while ($whois =~ /\G\S.*\(([A-Z0-9\-]+)\).*\n/mg) {
130 $handle = $1; 131 $handle = $1;
131 #return if $handle =~ /-(RIPE|APNIC)/; # heuristic, bbut bad because ripe might not have better info 132 #return if $handle =~ /-(RIPE|APNIC)/; # heuristic, but bad because ripe might not have better info
132 } 133 }
133 $handle or die "$whois ($ip): unparseable multimatch\n"; 134 $handle or die "$whois ($ip): unparseable multimatch\n";
134 $whois = $self->whois_request("!$handle"); 135 $whois = $self->whois_request("!$handle");
135 } 136 }
136 137

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines