Snort mailing list archives
RE: Database Question
From: "Kreimendahl, Chad J" <Chad.Kreimendahl () umb com>
Date: Wed, 13 Mar 2002 15:48:22 -0600
A simple few line piece of perl code that will do this easily... $ip = decimal form of ip... $output = dotted form. for (my $i=3;$i>=0;$i--){ my $t1 = sprintf ("%d",($ip / (256 ** $i))); $output .= $t1."."; $ip = $ip - ($t1 * (256 ** $i)) } -----Original Message----- From: Dean Scott [mailto:ScottD () FamilyMeds com] Sent: Wednesday, March 13, 2002 2:34 PM To: snort-users () lists sourceforge net Subject: [Snort-users] Database Question I am sending Snort logs to a Postgresql database. The output for the data section is in hex but the source and destination ip's are always 10 digit numbers. How do I convert these to dotted decimal ip addresses? Is there a way for Snort to do this for me? Dean _______________________________________________ Snort-users mailing list Snort-users () lists sourceforge net Go to this URL to change user options or unsubscribe: https://lists.sourceforge.net/lists/listinfo/snort-users Snort-users list archive: http://www.geocrawler.com/redir-sf.php3?list=snort-users _______________________________________________ Snort-users mailing list Snort-users () lists sourceforge net Go to this URL to change user options or unsubscribe: https://lists.sourceforge.net/lists/listinfo/snort-users Snort-users list archive: http://www.geocrawler.com/redir-sf.php3?list=snort-users
Current thread:
- Database Question Dean Scott (Mar 13)
- <Possible follow-ups>
- RE: Database Question Wirth, Jeff (Mar 13)
- Re: Database Question Roman Danyliw (Mar 13)
- RE: Database Question Kreimendahl, Chad J (Mar 13)
- RE: Database Question Kreimendahl, Chad J (Mar 13)