Spaces:
Runtime error
Runtime error
Download tests/debug_dns_python.py from Darshankumarr03/Swift-Query: direct link, hf CLI and curl.
- Browser
- Download file 376 Bytes
-
https://huggingface.co/spaces/Darshankumarr03/Swift-Query/resolve/main/tests/debug_dns_python.py
- Command line
-
hf download hf://spaces/Darshankumarr03/Swift-Query/tests/debug_dns_python.py
-
curl -L -o debug_dns_python.py https://huggingface.co/spaces/Darshankumarr03/Swift-Query/resolve/main/tests/debug_dns_python.py
376 Bytes
| import dns.resolver | |
| res = dns.resolver.get_default_resolver() | |
| print("Nameservers in use:", res.nameservers) | |
| try: | |
| answers = dns.resolver.resolve('_mongodb._tcp.swiftquery.itavzao.mongodb.net', 'SRV') | |
| print("Resolution Successful!") | |
| for r in answers: | |
| print(f"Target: {r.target} Port: {r.port}") | |
| except Exception as e: | |
| print(f"Resolution Failed: {e}") | |