dnssec

package module
v0.0.0-...-5ae3e56 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: MIT Imports: 4 Imported by: 1

README

dnssec

Get DNSSEC info of a domain

Check cmd folder for example usage.

Output:

{
  "domain": "binaryfigments.com",
  "answer": {
    "dsrecordcount": 1,
    "dnskeyrecordcount": 4,
    "dsrecords": [
      {
        "algorithm": 7,
        "digest": "403cc33ad60d52ad254607bd1c5fdcaf0020574e",
        "digesttype": 1,
        "keytag": 52653
      }
    ],
    "dnskeyrecords": [
      {
        "algorithm": 7,
        "flags": 256,
        "protocol": 3,
        "publickey": "AwEAAaIRIN0VPYdqbRI8i6zh6tmsIwf424VffKh7qeROoFoJ04AIl1KjV+unBa1hUgq0N25vhO1kpn3NDmyhvQhvNIq9M/MBJUmTucw3THpDHCUVpJsH4PrWVnEA5rkBjXy6guuSIl1GeUqXX9A0jL36yHs1vdph8mSxV36g0JHzVYiv"
      },
      {
        "algorithm": 7,
        "flags": 256,
        "protocol": 3,
        "publickey": "AwEAAegiFnEctYZ7OBENzucs4Lno/sJWr4lzPB9EkPzOVovrSBlbFWzjR2vd92vx13/vD5PtNmJ1PRz+0z74Y7Y2gIs+aS5RmE/co0zlMwhaYmuqeEO+HRzDxeSsDJoFToUy72tPT812sjQWOvfuiDuYphyicHcwdGkGNI3c0qP3Otlh"
      },
      {
        "algorithm": 7,
        "flags": 257,
        "protocol": 3,
        "publickey": "AwEAAd91QIVUw9qyE2UWyAY3IeWEwiGfhUwXBGvVa3GSnK5maQ0PzHJikmjeCfvyx+y13SJCopHxF1nXCaU9BXw7soriYpfI3V59ypuLVcy0iAzsZyyIpeVDyVsCbiCZJ7CNc6WlbC83JYaRVy5auRLFLslJKeAqQthKqgAXv05IPT5Syq+GQNre2G7fDZgzvv3A9ZIZyAGYfIWHqOHmw271tC6wOa9BzCenmK8dgRWMTO7Pc7OoqKEM42xjXlDqPX8I9SRV2w11/FRR3LquCuLft9OlRY9GMMxF7DmiEoyP1IdZzF+/yQhggvWE2OEcbIkU5rQIuCDzVTSOOjZE6+P3fHE="
      }
    ],
    "calculatedds": [
      {
        "algorithm": 7,
        "digest": "403cc33ad60d52ad254607bd1c5fdcaf0020574e",
        "digesttype": 1,
        "keytag": 52653
      },
      {
        "algorithm": 7,
        "digest": "1520f289eb26e138c380cdf3f460927101f727f9",
        "digesttype": 1,
        "keytag": 22802
      },
      {
        "algorithm": 7,
        "digest": "4c4e590562683c5b00761cd7aaa308f4b0eeb4e8",
        "digesttype": 1,
        "keytag": 38087
      }
    ],
    "matching": {
      "ds": [
        {
          "algorithm": 7,
          "digest": "403cc33ad60d52ad254607bd1c5fdcaf0020574e",
          "digesttype": 1,
          "keytag": 52653
        }
      ],
      "dnskey": [
        {
          "algorithm": 7,
          "flags": 256,
          "protocol": 3,
          "publickey": "AwEAAaIRIN0VPYdqbRI8i6zh6tmsIwf424VffKh7qeROoFoJ04AIl1KjV+unBa1hUgq0N25vhO1kpn3NDmyhvQhvNIq9M/MBJUmTucw3THpDHCUVpJsH4PrWVnEA5rkBjXy6guuSIl1GeUqXX9A0jL36yHs1vdph8mSxV36g0JHzVYiv"
        }
      ]
    }
  },
  "time": "2020-01-21T21:57:20.754828848+01:00",
  "dnssec": true,
  "nsec": {
    "type": "nsec3param",
    "nsec3param": {
      "Hdr": {
        "Name": "binaryfigments.com.",
        "Rrtype": 51,
        "Class": 1,
        "Ttl": 0,
        "Rdlength": 13
      },
      "Hash": 1,
      "Flags": 0,
      "Iterations": 100,
      "SaltLength": 8,
      "Salt": "5db86ef2e91811ad"
    }
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	DSRecordCount     int             `json:"dsrecordcount,omitempty"`
	DNSKEYRecordCount int             `json:"dnskeyrecordcount,omitempty"`
	DSRecords         []*DomainDS     `json:"dsrecords,omitempty"`
	DNSKEYRecords     []*DomainDNSKEY `json:"dnskeyrecords,omitempty"`
	CalculatedDS      []*DomainDS     `json:"calculatedds,omitempty"`
	Matching          Matching        `json:"matching,omitempty"`
}

Answer struct the answer of the question.

type Data

type Data struct {
	Domain       string    `json:"domain,omitempty"`
	Answer       Answer    `json:"answer"`
	CheckTime    time.Time `json:"time"`
	DNSSEC       bool      `json:"dnssec"`
	NSEC         NSEC      `json:"nsec"`
	Error        string    `json:"error,omitempty"`
	ErrorMessage string    `json:"errormessage,omitempty"`
}

Data struct

func Get

func Get(domain string, nameserver string) *Data

Get function

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"`
	CalculatedDS *DomainDS `json:"calculatedds,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 Matching

type Matching struct {
	DS     []*DomainDS     `json:"ds,omitempty"`
	DNSKEY []*DomainDNSKEY `json:"dnskey,omitempty"`
}

Matching struct for information

type NSEC

type NSEC struct {
	Type       string          `json:"type,omitempty"`
	NSEC       *dns.NSEC       `json:"nsec,omitempty"`
	NSEC3      *dns.NSEC3      `json:"nsec3,omitempty"`
	NSEC3PARAM *dns.NSEC3PARAM `json:"nsec3param,omitempty"`
}

NSEC struct for NSEC type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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