secynic / ipwhois

Retrieve and parse whois data for IPv4 and IPv6 addresses
https://ipwhois.readthedocs.io/en/latest
BSD 2-Clause "Simplified" License
552 stars 121 forks source link

How to assign specific RDAP server? #241

Open woei66 opened 5 years ago

woei66 commented 5 years ago

Hi,

According to the document https://ipwhois.readthedocs.io/en/latest/_modules/ipwhois/rdap.html There are multiple RDAP servers in the class and they are listed below.

I want to know how to assign a specific RDAP server for testing? (For exampe, I setup a local RDAP server and I want to use the ipwhois tool to check if it's result is correct) I didn't see any sub function to change the RIR_RDAP list. Is anything that I missed? Thank you.

` BOOTSTRAP_URL = 'http://rdap.arin.net/bootstrap'

RIR_RDAP = { 'arin': { 'ip_url': 'http://rdap.arin.net/registry/ip/{0}', 'entity_url': 'http://rdap.arin.net/registry/entity/{0}' }, 'ripencc': { 'ip_url': 'http://rdap.db.ripe.net/ip/{0}', 'entity_url': 'http://rdap.db.ripe.net/entity/{0}' }, 'apnic': { 'ip_url': 'http://rdap.apnic.net/ip/{0}', 'entity_url': 'http://rdap.apnic.net/entity/{0}' }, 'lacnic': { 'ip_url': 'http://rdap.lacnic.net/rdap/ip/{0}', 'entity_url': 'http://rdap.lacnic.net/rdap/entity/{0}' }, 'afrinic': { 'ip_url': 'http://rdap.afrinic.net/rdap/ip/{0}', 'entity_url': 'http://rdap.afrinic.net/rdap/entity/{0}' } }`

secynic commented 5 years ago

This isn't currently a feature. I can look at adding it. You can try modifying entries in that list in the meantime.