Snort mailing list archives

RE: Snort -> Mysql formatting IP addresses


From: "Jacob Roberts" <jake_roberts () byu edu>
Date: Thu, 16 Oct 2003 11:38:37 -0600

There is a function in MySQL that converts the values

Inet_ntoa(integer) = convert the 10 digit integer to an ip Address
(Number To Address)
Inet_aton(ip_address) = convert the IP address to a 10 digit number
(Addres to Number)

So you can do something like this:
Select inet_ntoa(ip_src), date from table where
ip_src=inet_aton('10.13.1.5');

The output Ips come out as Ips and the WHERE clause gets the 10 dig
number it wants.


-----Original Message-----
From: snort-users-admin () lists sourceforge net
[mailto:snort-users-admin () lists sourceforge net] On Behalf Of FWAdmin
Sent: Thursday, October 16, 2003 11:15 AM
To: Snort-Users
Subject: [Snort-users] Snort -> Mysql formatting IP addresses


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

------------------------- 
This e-mail communication (including any or all attachments) is intended
only for the use of the person or entity to which it is addressed and
may
contain confidential and/or privileged material. If you are not the
intended
recipient of this e-mail, any use, review, retransmission,
distribution,
dissemination, copying, printing, or other use of, or taking of any
action
in reliance upon this e-mail, is strictly prohibited. If you have
received
this e-mail in error, please contact the sender and delete the original
and
any copy of this e-mail and any printout thereof, immediately. Your
co-operation is appreciated. 

Le present courriel (y compris toute piece jointe) s'adresse uniquement
a
son destinataire, qu'il soit une personne ou un organisme, et pourrait
comporter des renseignements privilegies ou confidentiels. Si vous
n'etes
pas le destinataire du courriel, il est interdit d'utiliser, de revoir,
de
retransmettre, de distribuer, de disseminer, de copier ou d'imprimer ce
courriel, d'agir en vous y fiant ou de vous en servir de toute autre
facon.
Si vous avez recu le present courriel par erreur, priere de communiquer
avec
l'expediteur et d'eliminer l'original du courriel, ainsi que toute copie
electronique ou imprimee de celui-ci, immediatement. Nous sommes
reconnaissants de votre collaboration. 



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
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


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
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: