From cbae4a912b0b911ae7037cc7e88902b3a9be01e4 Mon Sep 17 00:00:00 2001 From: MaffC Date: Mon, 18 Mar 2013 01:34:38 +0000 Subject: [PATCH] Added handling for when an AS or IP does not exist --- aslookup | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aslookup b/aslookup index 9461974..36df120 100755 --- a/aslookup +++ b/aslookup @@ -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/;