net-dns-fingerprint (0.9.3-4) 02-apps-fpdns.patch

Summary

 apps/fpdns |   31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

    
download this patch

Patch contents

From: Anand Kumria <wildfire@progsoc.org>
Subject: allow changing of separator field


--- Net-DNS-Fingerprint-0.9.3/apps/fpdns	2005-03-04 15:17:28.000000000 +0100
+++ net-dns-fingerprint-0.9.3/apps/fpdns	2009-10-08 22:23:37.000000000 +0200
@@ -52,12 +52,13 @@
     $opt{F} = 10;
     $opt{T} = undef;
     $opt{Q} = undef;
+    $opt{S} = " ";
 
     my %children;
 
     my $concurrent = 0;
 
-    getopts('Q:DF:p:t:r:cfsdTv', \%opt);
+    getopts('Q:DF:p:t:r:cfsS:dTv', \%opt);
 
     if ($opt{v}) {
 	print STDERR "$progname version $version\n";
@@ -77,6 +78,7 @@
         forcetcp => $opt{T},
 	qversion => $opt{v},
 	qchaos   => $opt{f},
+	separator=> $opt{S},
     );
 
     if ($ARGV[0] eq "-") {
@@ -127,7 +129,7 @@
 	    }
 	}
     } else {
-	print STDERR "host not found ($server)";
+	print STDERR "host not found ($server)\n";
     }
 }
 
@@ -150,6 +152,14 @@
                    push @addresses, $address_rr->address if $address_rr->type eq "A";
                 }
              }
+
+             my $query_address6 = $resolver->send($rr->rdatastr, "AAAA") if $rr->type eq "NS";
+             if ($query_address6) {
+                foreach my $address_rr ($query_address6->answer) {
+                   push @addresses, $address_rr->address if $address_rr->type eq "AAAA";
+                }
+             }
+
           }
        }
     } else { 
@@ -159,6 +169,16 @@
 	     push @addresses, $rr->address if $rr->type eq "A";
 	  }
        }
+
+       my $query6 = $resolver->send($arg, "AAAA");
+
+       if ($query6) {
+          foreach my $rr ($query6->answer) {
+             push @addresses, $rr->address if $rr->type eq "AAAA";
+          }
+       }
+
+
     }
 
     return @addresses;
@@ -179,6 +199,7 @@
        -Q srcaddr (source IP address) [0.0.0.0]
        -r retry   (set number of attempts) [1]
        -s	  (short form) [off]
+       -S	  (separator) [" "]
        -t time    (set query timeout) [5]
        -T         (use TCP) [off]
        -v         (show version)
@@ -199,7 +220,7 @@
 
 B<fpdns> S<[ B<-c> ]> S<[ B<-d> ]> S<[ B<-f> ]> S<[ B<-F> I<nchild> ]>
    S<[ B<-p> I<port> ]> S<[ B<-Q> I<srcaddr> ]> S<[ B<-r> I<retry> ]>
-   S<[ B<-s> ]>  S<[ B<-t> I<timeout> ]> S<[ B<-v> ]> [I<server(s)>]
+   S<[ B<-s> ]>  S<[ B<-S> I<separator> ]> S<[ B<-t> I<timeout> ]> S<[ B<-v> ]> [I<server(s)>]
 
 =head1 DESCRIPTION
 
@@ -254,6 +275,10 @@
 
 Short display form. Useful for surveys. 
 
+=item B<-S>
+
+Separator. Defaults to " ".
+
 =item B<-t> I<timeout>
 
 Set the query timeout in seconds. Defaults to 5.