Snort mailing list archives

Re: Barnyard2 loads src IP and dst IP as digital in MySQL


From: Ian <snort_list () fishnet co uk>
Date: Wed, 8 Feb 2017 09:48:52 +0000

On 07/02/2017 21:52, Paul Li wrote:
I'm using Barnyard2 to load Snort alerts to MySQL database. In the iphdr
table, src IP and dstIP are showing as a long number, such as the following
+------------------+------------------+
| ip_src          | ip_dst         |
+------------------+------------------+
| 3232235693 | 3232235675 |
| 3232235675 | 3232235693 |
+------------------+-------------------+

Not sure what encoding/values they are. Just wondering how should I get
the original values, which are in the case 192.168.0.183 and 192.168.0.155?

Thanks,
Paul


Hi,

You can use the built in mysql functions to receive the IPs:

SELECT inet_ntoa(3232235693);

or

SELECT inet_ntoa(ip_src), inet_ntoa(ip_dst) FROM iphdr LIMIT 0,1;

Regards

Ian
-- 





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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://sourceforge.net/mailarchive/forum.php?forum_name=snort-users

Please visit http://blog.snort.org to stay current on all the latest Snort news!


Current thread: