Open-AudIT

What's on your network?
It is currently Fri Jan 19, 2018 8:02 pm

All times are UTC + 10 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Nov 24, 2016 3:33 pm 
Offline
Newbie

Joined: Tue Aug 02, 2016 9:52 pm
Posts: 11
I need to retrieve ip address v4 of all interfaces, but "ip" culomn data on "IP" table is padding with "0".
eg. 10.0.0.1 -> 010.000.000.001
I checked audit_linux.sh and it create normal (eg. 10.0.0.1) output in xml.
"010.000.000.001" format is hard to handle in SQL for us.
Are there any way to convert or store with normal format in Open-Audit database?
Any suggestions would be appreciated.
Regards,
Satoru Funai


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 29, 2016 2:26 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1225
Probably to make IP range calculation easy. May be a historical artifact but I'm not sure.

This should unpad in a SQL query. There may be better ways.
Code:
INET_NTOA(INET_ATON(ip))


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group