[Snort-users] how to convert sql ipsrc hdrs to quad notation

Andrew R. Baker andrewb0x29a at ...131...
Fri Oct 12 13:52:12 EDT 2001


Script no, but since you are using mysql, you can just do

	SELECT inet_ntoa(iphdr.ip_src) FROM iphdr;

mysql> select distinct inet_ntoa(ip_src) FROM iphdr;
+-------------------+
| inet_ntoa(ip_src) |
+-------------------+
| 10.1.3.2          |
| 10.1.3.3          |
| 10.1.3.12         |

-Andrew


--- Frontgate Lab <mdiwan at ...200...> wrote:
> Hi,
> 
>  does anyone have a script that converts these to dotted quad notation? 
> 
> can you at least guide me in the direction of writting such a script? ie
> the math behind it < where do i find it?
> 
> 
> mysql> SELECT  iphdr.ip_src   FROM  iphdr;
> +------------+
> | ip_src     |
> +------------+
> | 2546232230 |
> | 2546232230 |
> | 2546232230 |
> | 2546232230 |
> | 2546232230 |
> | 2546232230 |
> | 2546232230 |
> | 2546232230 |
> | 3232274123 |
> | 3232274123 |
> | 3232274123 |
> | 3232274123 |
> +------------+
> 12 rows in set (0.00 sec)
> 
> thank you
> 
> 
> Note: The information contained in this message may be privileged and
> confidential and protected from disclosure.  If the reader of this
> message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, you
> are hereby notified that any dissemination, distribution or copying of
> this communication is strictly prohibited. If you have received this
> communication in error, please notify us immediately by replying to the
> message and deleting it from your computer.  Thank you.  Wagner Weber &
> Williams
> 
> _______________________________________________
> Snort-users mailing list
> Snort-users at 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


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com




More information about the Snort-users mailing list