firehol / iprange

manage IP ranges
Other
197 stars 50 forks source link

iprange will read integer/numeric! #25

Open Jas0n99 opened 5 years ago

Jas0n99 commented 5 years ago

This isn't directly mentioned on the wiki page, but I had a hunch and after experimenting I found out that iprange will read numeric notation directly! So something like:

iprange 18279424 -> 1.22.236.0 iprange 18279424/24 -> 1.22.236.0/24 iprange 18279424-18279679 -> 1.22.236.0/24

Pretty nifty! That's less conversion back & forth when storing IPs in numeric / integer form.

ktsaou commented 5 years ago

Yes it does! It would also be nice to add an option to output in this format too...

Jas0n99 commented 5 years ago

Yes it would cool if it could output in integer form too, that would make loading into MySQL much more streamlined. But using the mysql built-in functions isn't really a big deal. I'm sure there are other instances though that would be helpful to some.