Documentation
¶
Overview ¶
Package dns handles all of the data structures and logic required to interact with DNS data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateRecord ¶
type CertificateRecord struct {
IssuerCAID int `json:"issuer_ca_id" yaml:"issuer_ca_id"`
IssuerName string `json:"issuer_name" yaml:"issuer_name"`
CommonName string `json:"common_name" yaml:"common_name"`
NameValue string `json:"name_value" yaml:"name_value"`
ID int64 `json:"id" yaml:"id"`
EntryTimestamp string `json:"entry_timestamp" yaml:"entry_timestamp"`
NotBefore string `json:"not_before" yaml:"not_before"`
NotAfter string `json:"not_after" yaml:"not_after"`
SerialNumber string `json:"serial_number" yaml:"serial_number"`
ResultCount int `json:"result_count" yaml:"result_count"`
}
CertificateRecord represents all of the information for a single x509 certificate record.
type CertsReport ¶
type CertsReport struct {
Domain string `json:"domain" yaml:"domain"`
Certificates []CertificateRecord `json:"certificates" yaml:"certificates"`
Errors []string `json:"errors" yaml:"errors"`
}
CertsReport represents the report of all certificates for a given domain including all non-fatal errors that occurred.
func GetDomainCerts ¶
func GetDomainCerts(ctx context.Context, domain string) (CertsReport, error)
GetDomainCerts queries crt.sh for all certificates for a given domain. It returns a CertsReport struct containing all certificates and any errors that occurred.
type Record ¶
type Record struct {
Name string `json:"name" yaml:"name"`
TTL uint32 `json:"ttl" yaml:"ttl"`
Type string `json:"type" yaml:"type"`
Value string `json:"value" yaml:"value"`
}
Record represents a single DNS record.
type Records ¶
type Records struct {
A []Record `json:"a" yaml:"a"`
AAAA []Record `json:"aaaa" yaml:"aaaa"`
MX []Record `json:"mx" yaml:"mx"`
TXT []Record `json:"txt" yaml:"txt"`
NS []Record `json:"ns" yaml:"ns"`
CNAME []Record `json:"cname" yaml:"cname"`
}
Records represents all of the DNS records for a given domain.
type RecordsReport ¶
type RecordsReport struct {
Domain string `json:"domain" yaml:"domain"`
DNSRecords Records `json:"dns_records" yaml:"dns_records"`
Errors []string `json:"errors" yaml:"errors"`
}
RecordsReport represents the report of all DNS records for a given domain including all non-fatal errors that occurred.
func GetDomainDNSRecords ¶
func GetDomainDNSRecords(ctx context.Context, domain string) (RecordsReport, error)
GetDomainDNSRecords queries DNS for all records for a given domain. It returns a RecordsReport struct containing all records that were and any non-fatal errors that occurred.
type SubdomainsEnumReport ¶
type SubdomainsEnumReport struct {
Domain string `json:"domain" yaml:"domain"`
Subdomains []string `json:"subdomains" yaml:"subdomains"`
Errors []string `json:"errors" yaml:"errors"`
}
SubdomainsEnumReport represents the report of all subdomains for a given domain including all non-fatal errors that occurred.
func GetDomainSubdomains ¶
func GetDomainSubdomains(ctx context.Context, domain string) (SubdomainsEnumReport, error)
GetDomainSubdomains queries subfinder for all subdomains for a given domain. It returns a SubdomainsEnumReport struct containing all subdomains and any errors that occurred.