+Spoofed names logging.
authorshort <>
Sat, 16 Oct 2004 12:40:03 +0000 (12:40 +0000)
committershort <>
Sat, 16 Oct 2004 12:40:03 +0000 (12:40 +0000)
netdnsspoof

index fec7741..140ffac 100755 (executable)
@@ -111,6 +111,15 @@ my($query_from_addr,$query)=@_;
        my $msg_spoof=$spoof->data();
        warn "sending spoof reply..." if $D;
        send $sock_udp,$msg_spoof,0,$query_from_addr or cluck "send(): $!";
+       if ($V) {
+               my($query_from_addr_port,$query_from_addr_host)=sockaddr_in($query_from_addr);
+               my $query_from_addr_name=inet_ntoa $query_from_addr_host;
+               print localtime()." spoof:"
+                               ." from=$query_from_addr_name:$query_from_addr_port"
+                               ." qname=".$question->qname()
+                               ." ip=".$opt_spoof_ip
+                               ."\n";
+               }
 }
 
 sub got_forward_reply($)