[Snort-users] Barnyard2 loads src IP and dst IP as digital in MySQL

Ian snort_list at ...16912...
Wed Feb 8 04:48:52 EST 2017


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
-- 








More information about the Snort-users mailing list