DNS (Domain Name System) is a system used to translate domain names into IP addresses and vice versa on the internet. DNS servers facilitate our access to websites and other internet services by performing these translations. This repository contains a Python script that demonstrates how to query DNS servers and check the NS (Name Server) records of a specific domain.
This project provides a Python script to query DNS servers and retrieve the NS records for a given domain. The script uses the dns.resolver
module to interact with DNS servers and the requests
module to fetch a list of DNS server IP addresses from a URL.
Before you begin, ensure you have met the following requirements:
- Python 3.x installed on your machine.
- The
dns
andrequests
Python modules installed. You can install them using the following commands:
pip install dnspython requests
-
Clone this repository: git clone https://github.com/yourusername/dns-server-query-python.git cd dns-server-query-python
-
Install the required dependencies as mentioned in the Prerequisites section.
- Open the
dns_server_query.py
file. - Replace the
domain
variable with the domain you want to check NS records for. - Run the script using the following command:
python dns_server_query.py
The script will query the DNS servers for NS records of the specified domain and display the results.
Contributions are welcome! If you find any issues or want to add improvements, feel free to submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.