Skip to content

NrdyBhu1/godns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple DNS Client in Go

This is a simple DNS client implemented in Go that sends a DNS query to a specified DNS server and prints the response. The client currently supports querying A records.

Features

  • Sends DNS queries to a specified DNS server (default: Google's public DNS server at 8.8.8.8).
  • Supports querying A records for a given domain.
  • Parses and displays the DNS response, including the resolved IP address.

Requirements

  • Go 1.16 or later

Installation

  1. Clone the repository:
$ git clone https://github.com/NrdyBhu1/godns.git
$ cd godns
  1. Build the application:
$ go build

Usage

Run the DNS client and enter the domain name you want to query:

./godns

You will be prompted to enter a domain name:

Enter domain: google.com

After entering the domain, the client will send a DNS query and display the response:

&main.DnsPacket{header:..., answers:...}
192.168.1.1

About

A DNS Server written in go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages