add TEXT dns search
This commit is contained in:
parent
74ecfe6c45
commit
71a95ac60d
|
@ -33,6 +33,7 @@ my %map_search_field = (
|
||||||
A => 'address',
|
A => 'address',
|
||||||
PTR => 'name',
|
PTR => 'name',
|
||||||
CNAME => 'cname',
|
CNAME => 'cname',
|
||||||
|
TXT => 'txtdata',
|
||||||
);
|
);
|
||||||
|
|
||||||
sub search {
|
sub search {
|
||||||
|
@ -51,12 +52,9 @@ sub search {
|
||||||
if ($reply) {
|
if ($reply) {
|
||||||
foreach my $rr ($reply->answer) {
|
foreach my $rr ($reply->answer) {
|
||||||
if (!defined($search_type)) {
|
if (!defined($search_type)) {
|
||||||
if ($rr->type eq 'A') {
|
push @results, $rr->address if ($rr->type eq 'A');
|
||||||
push @results, $rr->address;
|
push @results, $rr->name if ($rr->type eq 'PTR');
|
||||||
}
|
push @results, $rr->txtdata if ($rr->type eq 'TXT');
|
||||||
if ($rr->type eq 'PTR') {
|
|
||||||
push @results, $rr->name;
|
|
||||||
}
|
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue