whym / whois-gateway

Web-based whois gateway written in Python for lighttpd
BSD 3-Clause "New" or "Revised" License
26 stars 20 forks source link

Can't handle ranges #6

Open mbch331 opened 8 years ago

mbch331 commented 8 years ago

The tool currently can't handle ranges like: 62.145.192.0/19. Usually looking up 62.145.192.0 will show the information needed about the range.

whym commented 8 years ago

Whois in general cannot handle IP ranges as far as I know. whois 8.0.0.0/8 returns "No match found for n + 8.0.0.0/8" on my Linux machine.

We might want to look into http://pwhois.org/ .

SQL-enwiki commented 5 years ago

What I do normally when using this tool (or passing data to it from my tools) is to just strip off the CIDR, it's always given me what I needed anyhow.

It would be awesome if the tool did this automagically.

Huji commented 3 years ago

What I do normally when using this tool (or passing data to it from my tools) is to just strip off the CIDR, it's always given me what I needed anyhow.

It would be awesome if the tool did this automagically.

That is not entirely accurate. You are assuming the CIDR belongs to a single ASN but if it does not, you will run into issues.

For instance, at the time of this writing, 148.0.0.0/16 is composed of multiple ASNs; 148.0.0.0/18 belongs to Dominican Republic tel. comp., 148.64.0.0/19 is a Hong Kong-based range owned by Google, etc. So if you somehow start with 148.0.0.0/16 and just strip the /16 from it and run a WHOIS on 148.0.0.0 you will get a result that is not representative of the entire /16 range.