Added handling for when an AS or IP does not exist

This commit is contained in:
MaffC 2013-03-18 01:34:38 +00:00
parent eefc16d360
commit cbae4a912b
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,10 @@ sub handle_whois_output {
while($obj->isnt_exhausted) {
my %wresult;
my @whoisdata = split /\n/, $obj->value();
if($whoisdata[0] =~ /^%/) {
print "Lookup for $target failed!\n";
return;
}
foreach (@whoisdata) {
my $key = $_;
$key =~ s/^([a-z\-0-9]+):.*/$1/;