Integrate support for Namecheap Nameservers
Discussed in https://github.com/PhonePe/mantis/discussions/44
Originally posted by 0xbharath September 9, 2024 Folks,
I have written a simple Python script that can list all the subdomains for a given domains on Namecheap Nameservers via API access. Can we work on integrating this script?
https://gist.github.com/0xbharath/cb4a0d35b2031255e9e8c63d14f074bd
Hi, I am looking at this issue. It seems to be similar to this commit adding Cloudflare DNS support. Should i go ahead with aiohttp for async requests? I am not eligible for the API access, so I will not be able to test it.
@Prateek-Thakare Can you help here?
Hey @madhav6ram For any request, please use the BaseRequestExecutor to send the request. Also please make sure you test the integration before making a pull request. Feel free to post your queries here.
Hi @Prateek-Thakare Sorry for late reply. I just want to clarify if using BaseRequestExecutor is correct. Since its using the requests library, it is not async compatible. I have written a script using BaseRequestExecutor regardless.
I am testing it with the sandbox API (https://api.sandbox.namecheap.com/xml.response). But I always get <Error Number="2019166">Domain name not found</Error> as the response even if it seems to be using Namecheap (I checked via https://www.namecheap.com/domains/whois/). Can you please provide a domain that would work as an example?
@madhav6ram As discussed on Discord, this is because the sample request in Namecheap docs uses namecheap.com for the examples. This domain doesn't exist on your nameserver instance.
I can provide a sample working setup (API key) for Namecheap, if necessary. Let me know.