8000 Why we are not utilizing entities received in main response in RDAP · Issue #337 · secynic/ipwhois · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Why we are not utilizing entities received in main response in RDAP #337
Open
@DaudAhmad0303

Description

@DaudAhmad0303

I am confused with the implementation in RDAP.py for not utilizing the whole response received after querying from RDAP.

For instance, considering the RDAP response for IP address 8.8.8.8:
https://rdap.arin.net/registry/ip/8.8.8.8

We get all the entries inside it at once:

Image

But we are only fetching the entity handle only while parsing. If depth is given more than 0, then we again use that handle to query as an entity object. The problem with this approach is that we are utilizing more requests to the RDAP and in case of LACNIC, there is more rate limiting applied, resulting in more blockage.

Why not we use the same response entities received at first and parse them all, if depth is provided more than 0, then we'll place those entity objects based upon the depth number given. Otherwise, only keep the entity handles only in the list.

The affected code for only parsing the entity handles, not whole objects is following:

ipwhois/ipwhois/rdap.py

Lines 648 to 652 in b8c79c4

for ent in self.json['entities']:
if ent['handle'] not in self.vars['entities']:
self.vars['entities'].append(ent['handle'])

While, the responses from the library with 0 and 1 depth provided is differentiated here:

https://www.diffchecker.com/QoIknZE5/

Please share your thoughts on the above issue to implement or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0