Skip to content

4thel00z/libdns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libdns

libdns-tests libdns-logo

Go DNS Library that exposes various DNS primitives to the user such as:

  • DNS Servers
  • Models for the DNS format
  • Various DNS constants
  • etc.

Besides that it sports a high-level API to enable simple programs that want to query DNS servers and not bother with the nitty-gritty.

Example usage

This demonstrates how you can make a simple DNS query.

package main

import (
	"fmt"
	"github.com/4thel00z/libdns/v1"
	"github.com/4thel00z/libdns/v1/pkg/libdns/utils"
)

func main() {
	response, err := v1.SimpleQueryOnce(utils.CloudflarePrimary, "ransomware.host", utils.A, utils.InternetClass, 10)
	if err != nil {
		panic(err)
	}
	fmt.Printf("%v", response)
}

Todo

  • Add parsing the response portion ☑
  • Add tests ☑
  • Add dns record constants ☑
  • Add question parsing ☑
  • Add high-level API (first high-level API added) ☐
  • Add documentation ☐
  • Add examples ☐

Acknowledgements

This project has drawn inspiration from go-dnsquery.

License

This project is licensed under the GPL-3 license.

About

Aspiring to be the goto DNS library for Go

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages