client9 / ipcat

Categorization of IP Addresses
MIT License
527 stars 132 forks source link

Why not just CIDR blocks? #149

Open gadelkareem opened 5 years ago

gadelkareem commented 5 years ago

I am using https://github.com/yl2chen/cidranger to look up IPs inside of CIDR blocks and I think having the CIDR blocks on the CSV file would make much more sense. Any reason for using ranges over CIDR blocks?

jrivero commented 5 years ago

I use cidr blocks and it's less accurate. Some blocks contains ips with different objective

jrivero commented 5 years ago

Excuse me, I do not use "cidr blocks", I use ASN... I had thought about sharing it and I discovered the mistake

gadelkareem commented 5 years ago

I think using CIDR blocks directly will also simplify this library since most hosting providers have a CIDR list of their network. However the list already contains a lot of ranges that do not have a reference in the code, which we could use this code to convert it back https://play.golang.org/p/nJE2EPx88-