Snort mailing list archives

RE: Snort -> Mysql formatting IP addresses


From: Steve Halligan <shalligan () 333tech com>
Date: Thu, 16 Oct 2003 13:07:48 -0500


Hey all. I have a problem with the way MySQL / ACID stores IP 
addresses from
Snort. It stores them in the database in a 10 digit integer 
format, but I
need to convert that to a real 4 octet IP address. What is 
the mathematics
used to do the conversion?

Does anyone have a perl script that will do this?

Thanks

-Jason


First off, one drink penalty for a signature longer that the actual
message.  (or was it 2 drinks?)

When you run the query wrap a INET_NTOA() around the table column that
you want in dotted decimal.

If you want to query based on a dotted decimal use INET_ATON('1.2.3.4')
in your WHERE clause.


-steve


-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
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: