elceef / dnstwist

Domain name permutation engine for detecting homograph phishing attacks, typo squatting, and brand impersonation
https://dnstwist.it
Apache License 2.0
4.85k stars 767 forks source link

DNS over https/tls #137

Closed P-T-I closed 2 years ago

P-T-I commented 2 years ago

First of all; thank you very much for this project!

I'm using it for my own pet project and had the requirement to, instead of making regular DNS requests, make DNS requests over https (DoH).

I was wondering if this functionality is something you would consider incorporating into dnstwist?

As DoH uses HTTP GET requests to; there might be some additional performance improvements as well if we leverage async coroutines (haven't fully tested that btw)

elceef commented 2 years ago

Pull the latest code and try it like so:

./dnstwist.py --nameservers https://dns.google/dns-query dnstwist.it

DNS-over-HTTPS requires DNSPython 2.0 or newer!

P-T-I commented 2 years ago

Awesome, thanks! Are you planning to create a new release any time soon?

elceef commented 2 years ago

Yes I do, but can't give you any time estimate at the moment.

P-T-I commented 2 years ago

No worries; patience is my friend.... Closing for now; looking forward to your release! Thanks again!

P-T-I commented 2 years ago

I just came around testing his; it doesn't seem to work. I see no requests going out to the DoH server at all...

elceef commented 2 years ago

Which version of DNSPython is installed? Could you run it with --debug argument?

P-T-I commented 2 years ago

Python dns version is 2.1.0

The debug switch only reported dns timeouts...

elceef commented 2 years ago

Which DoH server did you use? Is it publicly available?

P-T-I commented 2 years ago

Google's Doh; exactly used the command syntax as you provided in this issue.

elceef commented 2 years ago

Do you get DoH response when using curl?:

$ curl -H 'accept: application/dns-message' -v 'https://dns.google/dns-query?dns=q80BAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB' | xxd