dnscheck

package module
v0.0.0-...-06b19a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2017 License: MIT Imports: 6 Imported by: 0

README

Go / Golang DNS and DNSSEC Check

API DNS and DNSSEC information from DNS for use as module.

For example:

$ ./checkdns -host=localhost -port=4004

Dependencies

go get -u golang.org/x/net/idna
go get -u github.com/miekg/dns
go get -u golang.org/x/net/publicsuffix

TODO

  • TOP DOWN DNS CHECK!
  • Error checking and reporting
  • Saving data for later use
  • normal formatting
  • DNSSEC check
  • Summary
  • Structuring
  • More information

Download, build and run

asciicast

Test with curl

asciicast

Contributing

  1. Fork this project
  2. Create your own feature branch git checkout -b your-new-feature
  3. Commit your changes git commit -am 'Added some features'
  4. Push to the branch git push origin your-new-feature
  5. Create new Pull Request

If it's prossibe, one feature at a time ;-).

Maintainers

Component Contact person Github label Link
Project @binaryfigments [comp:base] (https://github.com/binaryfigments/dnscheck/labels/core) https://binaryfigments.com

The MIT License (MIT)

Copyright (c) 2016 Sebastian Broekhoven

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	Registry          Registry        `json:"tld,omitempty"`
	Nameservers       Nameservers     `json:"nameservers,omitempty"`
	SOA               *Soa            `json:"SOA,omitempty"`
	DSRecordCount     int             `json:"DSRecordCount,omitempty"`
	DNSKEYRecordCount int             `json:"DNSKEYRecordCount,omitempty"`
	DomainDS          []*DomainDS     `json:"DomainDS,omitempty"`
	DomainDNSKEY      []*DomainDNSKEY `json:"DomainDNSKEY,omitempty"`
	DomainCalcDS      []*DomainCalcDS `json:"DomainCalcDS,omitempty"`
	DomainA           []string        `json:"DomainA,omitempty"`
	DomainAAAA        []string        `json:"DomainAAAA,omitempty"`
	DomainMX          []string        `json:"DomainMX,omitempty"`
	Email             Email           `json:"Email,omitempty"`
	TLSARecords       []*Tlsa         `json:"TLSARecords,omitempty"`
}

Answer struct the answer of the question.

type Controls

type Controls struct {
	Shortcode   string `json:"shortcode,omitempty"`
	Group       string `json:"group,omitempty"`
	Description string `json:"description,omitempty"`
	Points      int    `json:"points,omitempty"`
}

Controls struct check information

type DomainCalcDS

type DomainCalcDS struct {
	Algorithm  uint8  `json:"Algorithm,omitempty"`
	Digest     string `json:"Digest,omitempty"`
	DigestType uint8  `json:"DigestType,omitempty"`
	KeyTag     uint16 `json:"KeyTag,omitempty"`
}

DomainCalcDS struct

type DomainDNSKEY

type DomainDNSKEY struct {
	Algorithm uint8  `json:"Algorithm,omitempty"`
	Flags     uint16 `json:"Flags,omitempty"`
	Protocol  uint8  `json:"Protocol,omitempty"`
	PublicKey string `json:"PublicKey,omitempty"`
}

DomainDNSKEY struct

type DomainDS

type DomainDS struct {
	Algorithm  uint8  `json:"Algorithm,omitempty"`
	Digest     string `json:"Digest,omitempty"`
	DigestType uint8  `json:"DigestType,omitempty"`
	KeyTag     uint16 `json:"KeyTag,omitempty"`
}

DomainDS struct

type Email

type Email struct {
	MX    []string `json:"MX,omitempty"`
	SPF   []string `json:"SPF,omitempty"`
	DMARC []string `json:"DMARC,omitempty"`
}

Email struct

type Message

type Message struct {
	Question Question    `json:"question"`
	Answer   Answer      `json:"answer"`
	Controls []*Controls `json:"controls"`
}

Message struct for returning the question and the answer.

func Run

func Run(domain string, startnameserver string) (*Message, error)

Run function

type Nameservers

type Nameservers struct {
	Root     []string `json:"root,omitempty"`
	Registry []string `json:"registry,omitempty"`
	Domain   []string `json:"domain,omitempty"`
	Domain2  []string `json:"domain2,omitempty"`
}

Nameservers struct for information

type Question

type Question struct {
	JobDomain  string    `json:"domain"`
	JobStatus  string    `json:"status"`
	JobMessage string    `json:"message"`
	JobTime    time.Time `json:"time"`
}

Question struct for retuning what information is asked.

type Registry

type Registry struct {
	TLD   string `json:"tld,omitempty"`
	ICANN bool   `json:"icann,omitempty"`
}

Registry struct for information

type Soa

type Soa struct {
	Ns      string `json:"ns,omitempty"`
	Mbox    string `json:"mbox,omitempty"`
	Serial  uint32 `json:"serial,omitempty"`
	Refresh uint32 `json:"refresh,omitempty"`
	Retry   uint32 `json:"retry,omitempty"`
	Expire  uint32 `json:"expire,omitempty"`
	Minttl  uint32 `json:"minttl,omitempty"`
}

Soa struct for SOA information aquired from the nameserver.

type Tlsa

type Tlsa struct {
	Record       string `json:"record,omitempty"`
	Certificate  string `json:"certificate,omitempty"`
	MatchingType uint8  `json:"matchingtype,omitempty"`
	Selector     uint8  `json:"selector,omitempty"`
	Usage        uint8  `json:"usage,omitempty"`
}

Tlsa struct for SOA information

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL