Hi,
I’m currently trying to create a script in python to detect whether the server support DoH or not
Here is my code (based on the informations here )
#!/usr/bin/env python3
import requests
r=requests.get(“https://Cloudflare-dns.com/dns-query?name=example.com&type=A ”, headers={“accept”:“application/dns-message”})
print(r.url)
print(r.headers)
print(r.status_code)
But the answer that I get is 400.
Can anyone help me?
Thanks
sandro
December 17, 2018, 7:16pm
2
What do you mean by that? Which server?
If I try to make a DoH request to a server and the answer is good, I can conclude that he supports DoH.
I know that the server in my script(the one from Cloudflare) accepts DoH, but I’m trying with this one to be sure my script is working properly
sandro
December 17, 2018, 7:23pm
4
What server are you talking about? Are you trying to check whether a certain HTTPS URL is an actual DoH endpoint/server?
If a take a list of 100 IP DNS server for example, to check if they can answer in DoH
sandro
December 17, 2018, 7:30pm
6
You basically need to implement a DoH client, but that topic is way off-topic for here.
Yeah, but I’m trying to make a script for it, so I don’t have to copy /paste each IP one by one
sandro
December 17, 2018, 7:34pm
8
In any case it is off-topic for the forum here
system
Closed
January 16, 2019, 7:03pm
9
This topic was automatically closed after 30 days. New replies are no longer allowed.