| 1 |
From: Anand Kumria <[email protected]> |
| 2 |
Subject: allow changing of separator field |
| 3 |
|
| 4 |
|
| 5 |
--- Net-DNS-Fingerprint-0.9.3/apps/fpdns 2005-03-04 15:17:28.000000000 +0100 |
| 6 |
+++ net-dns-fingerprint-0.9.3/apps/fpdns 2009-10-08 22:23:37.000000000 +0200 |
| 7 |
@@ -52,12 +52,13 @@ |
| 8 |
$opt{F} = 10; |
| 9 |
$opt{T} = undef; |
| 10 |
$opt{Q} = undef; |
| 11 |
+ $opt{S} = " "; |
| 12 |
|
| 13 |
my %children; |
| 14 |
|
| 15 |
my $concurrent = 0; |
| 16 |
|
| 17 |
- getopts('Q:DF:p:t:r:cfsdTv', \%opt); |
| 18 |
+ getopts('Q:DF:p:t:r:cfsS:dTv', \%opt); |
| 19 |
|
| 20 |
if ($opt{v}) { |
| 21 |
print STDERR "$progname version $version\n"; |
| 22 |
@@ -77,6 +78,7 @@ |
| 23 |
forcetcp => $opt{T}, |
| 24 |
qversion => $opt{v}, |
| 25 |
qchaos => $opt{f}, |
| 26 |
+ separator=> $opt{S}, |
| 27 |
); |
| 28 |
|
| 29 |
if ($ARGV[0] eq "-") { |
| 30 |
@@ -127,7 +129,7 @@ |
| 31 |
} |
| 32 |
} |
| 33 |
} else { |
| 34 |
- print STDERR "host not found ($server)"; |
| 35 |
+ print STDERR "host not found ($server)\n"; |
| 36 |
} |
| 37 |
} |
| 38 |
|
| 39 |
@@ -150,6 +152,14 @@ |
| 40 |
push @addresses, $address_rr->address if $address_rr->type eq "A"; |
| 41 |
} |
| 42 |
} |
| 43 |
+ |
| 44 |
+ my $query_address6 = $resolver->send($rr->rdatastr, "AAAA") if $rr->type eq "NS"; |
| 45 |
+ if ($query_address6) { |
| 46 |
+ foreach my $address_rr ($query_address6->answer) { |
| 47 |
+ push @addresses, $address_rr->address if $address_rr->type eq "AAAA"; |
| 48 |
+ } |
| 49 |
+ } |
| 50 |
+ |
| 51 |
} |
| 52 |
} |
| 53 |
} else { |
| 54 |
@@ -159,6 +169,16 @@ |
| 55 |
push @addresses, $rr->address if $rr->type eq "A"; |
| 56 |
} |
| 57 |
} |
| 58 |
+ |
| 59 |
+ my $query6 = $resolver->send($arg, "AAAA"); |
| 60 |
+ |
| 61 |
+ if ($query6) { |
| 62 |
+ foreach my $rr ($query6->answer) { |
| 63 |
+ push @addresses, $rr->address if $rr->type eq "AAAA"; |
| 64 |
+ } |
| 65 |
+ } |
| 66 |
+ |
| 67 |
+ |
| 68 |
} |
| 69 |
|
| 70 |
return @addresses; |
| 71 |
@@ -179,6 +199,7 @@ |
| 72 |
-Q srcaddr (source IP address) [0.0.0.0] |
| 73 |
-r retry (set number of attempts) [1] |
| 74 |
-s (short form) [off] |
| 75 |
+ -S (separator) [" "] |
| 76 |
-t time (set query timeout) [5] |
| 77 |
-T (use TCP) [off] |
| 78 |
-v (show version) |
| 79 |
@@ -199,7 +220,7 @@ |
| 80 |
|
| 81 |
B<fpdns> S<[ B<-c> ]> S<[ B<-d> ]> S<[ B<-f> ]> S<[ B<-F> I<nchild> ]> |
| 82 |
S<[ B<-p> I<port> ]> S<[ B<-Q> I<srcaddr> ]> S<[ B<-r> I<retry> ]> |
| 83 |
- S<[ B<-s> ]> S<[ B<-t> I<timeout> ]> S<[ B<-v> ]> [I<server(s)>] |
| 84 |
+ S<[ B<-s> ]> S<[ B<-S> I<separator> ]> S<[ B<-t> I<timeout> ]> S<[ B<-v> ]> [I<server(s)>] |
| 85 |
|
| 86 |
=head1 DESCRIPTION |
| 87 |
|
| 88 |
@@ -254,6 +275,10 @@ |
| 89 |
|
| 90 |
Short display form. Useful for surveys. |
| 91 |
|
| 92 |
+=item B<-S> |
| 93 |
+ |
| 94 |
+Separator. Defaults to " ". |
| 95 |
+ |
| 96 |
=item B<-t> I<timeout> |
| 97 |
|
| 98 |
Set the query timeout in seconds. Defaults to 5. |