PhonePe / mantis

Mantis is a security framework that automates the workflow of discovery, reconnaissance, and vulnerability scanning.
https://phonepe.github.io/mantis/introduction/introduction.html
Apache License 2.0
880 stars 110 forks source link

Integrate support for Namecheap Nameservers #46

Open 0xbharath opened 1 month ago

0xbharath commented 1 month ago

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
madhav6ram commented 1 month ago

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.

0xbharath commented 1 month ago

@Prateek-Thakare Can you help here?

Prateek-Thakare commented 1 month ago

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.

madhav6ram commented 1 month ago

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 Domain name not found 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?

0xbharath commented 1 month ago

@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.