[Nfdump-discuss] nfsen patch for reverse DNS/whois
netflow collecting and processing tools
Brought to you by:
phaag
|
From: Brian C. <b.c...@po...> - 2014-05-14 13:11:52
|
This is a tiny patch for nfsen - unfortunately the bug tracker on
sourceforge doesn't seem to let me create a new ticket there.
It fixes a problem where if a site has no reverse DNS, the whois data is
missing. This is because of the text "<not found>" which is inserted
into the output unescaped, so the browser treats it as an HTML tag.
Regards,
Brian.
--- libexec/AbuseWhois.pm.orig 2014-05-14 15:56:58.937235041 +0300
+++ libexec/AbuseWhois.pm 2014-05-14 15:59:14.125237634 +0300
@@ -381,7 +381,7 @@
my $hostname = scalar gethostbyaddr(inet_pton($af, $ip), $af);
if ( !defined $hostname ) {
- $hostname = '<not found>';
+ $hostname = '<not found>';
}
return $hostname;
@@ -743,7 +743,7 @@
}
my $hostname = Reverse_name($ip);
- print $sock "<b>$ip -> $hostname</b>\n";
+ print $sock "<b>$ip -> $hostname</b>\n";
print $sock "<pre>\n";
my ($net, $org_id) = ARNIN_stage1($ip);
|