Skip to content

bored-engineer/go-dnsdb

Repository files navigation

go-dnsdb GoDoc Build Status Coverage Status

An (Unofficial) Golang client for Farsight Security's DNSDB (https://api.dnsdb.info/)

Usage

import "github.com/bored-engineer/go-dnsdb"

To list all RRSet records matching www.farsightsecurity.com:

records, _, err := client.RRSet.LookupName("www.farsightsecurity.com", nil)
if err != nil {
	panic(err)
}
for _, record := range records {
	fmt.Println("%s: %v", *record.RRName, record.RData)
}

For furthur usage see the GoDocs.

Authentication

The dnsdb library does not directly handle authentication. Instead, when creating a new client, you can pass a http.Client that handles authentication for you. It does provide a APIKeyTransport structure when using API Key authentication. It is used like this:

tp := dnsdb.APIKeyTransport{
	APIKey: "d41d8cd98f00b204e9800998ecf8427e",
}

client := dnsdb.NewClient(tp.Client())

About

A (Unofficial) Golang API Client for DNSDB - https://api.dnsdb.info/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages