Skip to content

Does a DNS request to identify the DNS server that provided the reply

License

Notifications You must be signed in to change notification settings

earentir/whichdns

Repository files navigation

whichdns

When you do a DNS request, which DNS server is used? This tool will tell you. It does a DNS request while doing a packet capture and gets the DNS server that replied.

Warning: Requires root access since it does a packet capture while doing the dns requests.

Usage/Examples

get DNS server

sudo ./whichdns

Reutrn only the DNS server for use in scripts

sudo ./whichdns --iponly

How To build

Needs pcap to build

Fedora

dnf install libpcap-devel

Debian

apt install libpcap-dev

Build

CGO_ENABLED=1 go build

Example output

Default interface: wlp4s0
2024/03/11 22:16:18 Making DNS requests
2024/03/11 22:16:18 DNS request made.
2024/03/11 22:16:18 DNS response from: 192.168.178.21

Dependancies & Documentation

Go Mod

Dependancies

OpenSSF Best Practices

OpenSSF Scorecard

Contributing

Contributions are always welcome! All contributions are required to follow the https://google.github.io/styleguide/go/

Vulnerability Reporting

Please report any security vulnerabilities to the project using issues or directly to the owner.

Code of Conduct

This project follows the go project code of conduct, please refer to https://go.dev/conduct for more details

Roadmap

  • add options to return just the dns server for use in scripts

Authors

License

I will always follow the Linux Kernel License as primary, if you require any other OPEN license please let me know and I will try to accomodate it.

License

About

Does a DNS request to identify the DNS server that provided the reply

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published