Skip to content

Commit

Permalink
Merge pull request #4 from srcq/master
Browse files Browse the repository at this point in the history
Fix the previous diff for the case when the answer is a CNAME
  • Loading branch information
fwaeytens committed Feb 20, 2015
2 parents 33989e4 + 5f5ee59 commit e3336c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dnsenum.pl
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,15 @@ BEGIN
printrr($rr->string);
#wildcardaddress will hold the IP that's used as a string
my @wcheck= split('\s+',$rr->string);
push (@wildcardaddress, $wcheck[4]);
push @wildcardaddress, $wcheck[4];

}
if ($rr->type eq 'CNAME')
{
printrr($rr->string);
#wildcardcname will hold CNAME that's used as a string
my @wcheck= split('\s+',$rr->string);
push(@wildcardcname, $wcheck[4]);
push @wildcardcname, $wcheck[4];

}
}
Expand Down Expand Up @@ -695,7 +695,7 @@ sub nslookup {
if ($query) {
foreach my $rr ($query->answer) {
##we only print / add the result if it doesn't match the wildcardaddress
if (!($rr->address ~~ @wildcardaddress) && !($rr->name ~~ @wildcardcname))
if (!($rr->can('address') && $rr->address ~~ @wildcardaddress) && !($rr->name ~~ @wildcardcname))
{
printrr($rr->string);
xml_host($rr);
Expand Down

0 comments on commit e3336c5

Please sign in to comment.