{"id":23741528,"url":"https://github.com/pookie-n-rookie/dns_server","last_synced_at":"2026-03-05T10:30:18.954Z","repository":{"id":270090364,"uuid":"909310272","full_name":"Pookie-n-Rookie/DNS_SERVER","owner":"Pookie-n-Rookie","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-28T10:22:09.000Z","size":4951,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T11:21:36.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pookie-n-Rookie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-28T10:17:01.000Z","updated_at":"2024-12-28T10:22:12.000Z","dependencies_parsed_at":"2024-12-28T11:32:40.350Z","dependency_job_id":null,"html_url":"https://github.com/Pookie-n-Rookie/DNS_SERVER","commit_stats":null,"previous_names":["pookie-n-rookie/dns_server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pookie-n-Rookie%2FDNS_SERVER","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pookie-n-Rookie%2FDNS_SERVER/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pookie-n-Rookie%2FDNS_SERVER/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pookie-n-Rookie%2FDNS_SERVER/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pookie-n-Rookie","download_url":"https://codeload.github.com/Pookie-n-Rookie/DNS_SERVER/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239889270,"owners_count":19713752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-31T10:57:14.203Z","updated_at":"2026-03-05T10:30:18.820Z","avatar_url":"https://github.com/Pookie-n-Rookie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":" ## Overview\nThis DNS server is a simple implementation of a DNS server that processes DNS queries and provides responses based on zone data. It supports common DNS record types like A, AAAA, NS, and SOA, and can handle both standard queries and reverse lookups.\n\n## Functionality\n\nThis server listens for DNS queries, processes them, and responds with the appropriate DNS records, based on the zone data available. The server supports standard DNS query types, including A (host address), AAAA (IPv6 address), NS (name server), and SOA (start of authority).\n\nThe DNS query and response structure follows the format outlined in RFC 1035, where the request is divided into the header and question sections, and the response includes the answer, authority, and additional sections.\n\n## Features\n### mydns.py\n- Handles Common Record Types: A, AAAA, NS, SOA.\n- Supports Reverse Lookups: Based on the zone data provided.\n- Query Resolution: Resolves queries against configured zones.\n### dns_enumeration.py\n- returns various important information about the target like DNS record types, host names, IP addresses and much more depending upon the configuration of that target system.\n\n# Setting Up the Python Environment\n\nThis guide will help you set up a Python virtual environment and install the required dependencies from the `requirement.txt` file. \n\n## Prerequisites\n\n- **Python 3.7+** must be installed on your system.\n- **pip** (Python's package manager) should be available.\n\n## Steps\n\n### Clone the Repository\n\nFirst, clone the repository from GitHub:\n\n```bash\ngit clone \u003crepository_url\u003e\ncd \u003crepository_directory\u003e\n```\nReplace \u003crepository_url\u003e with your repository URL and \u003crepository_directory\u003e with the name of the folder created.\n### Create a Virtual Environment\nRun the following command to create a virtual environment:\n```bash\npython -m venv venv\n```\nThis will create a virtual environment named venv in the current directory.\n### Activate the Virtual Environment\nWindows:\n```bash\nvenv\\Scripts\\activate\n```\nmacOS/Linux:\n```bash\nsource venv/bin/activate\n```\n### Install Dependencies\nAfter activating the virtual environment, install the required dependencies:\n\n```bash\npip install -r requirement.txt\n```\n## Start the DNS server:\n\n```bash\npython mydns.py\n```\n\nOpen another terminal and use nslookup to test:\n\n```bash\n\n# Query default @(domain name specified in the ORIGIN) record for example.com\nnslookup example.com 127.0.0.1\n\n# Query specific record types\nnslookup -type=a example.com 127.0.0.1\nnslookup -type=aaaa example.com 127.0.0.1\nnslookup -type=soa example.com 127.0.0.1\nnslookup -type=ns example.com 127.0.0.1\n\n# Query subdomain (e.g., www.example.com)\nnslookup www.example.com 127.0.0.1\n```\n## Run the enumeration script:\n\n```bash\npython enumeration.py\n\nenter the domain:\u003c enter as you desire \u003e\n```\n# Testing:\n\n### Explanation of mydns.py\n\nhttps://github.com/user-attachments/assets/39a72657-db8b-4ba6-b011-082333783cd1\n\n\n\n### Explanation of dns_enumeration.py\nfor testing I have used google.com and instagram.com(you might check for other sites too)\n\nhttps://github.com/user-attachments/assets/92eb43aa-aecc-4e0e-9b2f-672ea216c727\n\n\n\n## References\n\n1. **RFC 1035** - Domain Names - Implementation and Specification: [Read Here](https://datatracker.ietf.org/doc/html/rfc1035)  \n2. **Hand-Writing DNS Messages** by Routley: [Read Here](https://routley.io/posts/hand-writing-dns-messages)\n3. **Python DNS TOOLKIT**:[Read Here](https://pypi.org/project/dnspython/)\n\n\n## Disclaimer\nThis project is made for educational purposes only. It is intended to demonstrate how a DNS server operates and should not be used in production environments. Always ensure security and compliance when dealing with network services.\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpookie-n-rookie%2Fdns_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpookie-n-rookie%2Fdns_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpookie-n-rookie%2Fdns_server/lists"}