Coder Social home page Coder Social logo

Comments (3)

meeb avatar meeb commented on August 24, 2024 2

That doesn't match with the flat results otherwise returned for every other value, you can always use raw=True if you need to see all the data and get the list. The parsed data is specifically lossy to be a simple representation of the query response. I also can't retroactively change the IPvXNetwork object to be a list without making it a breaking API change. In this example returning the CIDR the queried IP matches is probably the most useful.

I'll consider adding a networks value in addition to the network value if there is a demand for it as a new field, though.

from whoisit.

meeb avatar meeb commented on August 24, 2024

Thanks for the report. whoisit was previously returning just the first CIDR in the list if multiple were returned, I'd not seen results where this wasn't valid until your example. As of the just pushed v2.5.3 this now will iterate the CIDRs and attempt to match the queried IP to check it is inside the CIDR. If the IP is matched to be in a CIDR that CIDR is returned as the network.

In your specific example, for whoisit.ip('13.104.0.0') the value of results['network'] will now be IPv4Network('13.104.0.0/14').

from whoisit.

rasanentimo avatar rasanentimo commented on August 24, 2024

Thanks for the quick response! Actually, I think it would be better to return a list of CIDRs, the same way as on the original response. In this case the allocated range is 13.64.0.0 - 13.107.255.255 which means CIDRs 13.64.0.0/11, 13.96.0.0/13 & 13.104.0.0/14 (https://search.arin.net/rdap/?query=13.104.0.0).

from whoisit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.