Snort mailing list archives

Re: using snort without an IP Addy


From: Andy Bach <root () wiwb uscourts gov>
Date: Tue, 3 Jul 2001 09:14:09 -0500

From: "Frontgate Lab" <mdiwan () wagweb com>

 i got it working mostly | now i just get occasional=20

Use of uninitialized value in gethostbyaddr at /usr/bin/snort2html line
90 i am using snort2html to give me my snortalerts in a daily html
file ( i belive snort2html only does this on UDP packets) ..  oh well
one step at a time
The error :

"Use of uninitialized value in gethostbyaddr at /usr/bin/snort2html line"

is generated by the PERL interpreter when the "-w" switch is used.  It
doesn't necessarily mean something is broke, it means a variable that was
never explicity assigned a value is being used as an R-value.  

I believe that error could be fixed by changing line 90 in snort2html 
from:
$targethost=gethostbyaddr(inet_aton($targetip), AF_INET);
to:
$targethost=gethostbyaddr(inet_aton($targetip), AF_INET) 
   if $targetip and $targetip =~ /[\d.]+/;

that is: test targetip for a value and that it is a vaguely IPish format.

a

Andy Bach, Sys. Mangler             
Internet: andy () wiwb uscourts gov    VOICE: (608) 264-5178 ex 5738, FAX 264-510

       'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet
                                -Bert Hubert


_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
http://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: