securitytrails

package
v0.0.0-...-4d2d905 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchDomains

func FetchDomains(domain string) ([]string, error)

Types

type Client

type Client struct {
	*req.Client
}

func NewClient

func NewClient(apiKey string) *Client

func (*Client) DomainDetails

func (c *Client) DomainDetails(domain string) (resp DomainDetailsResponse, err error)

func (*Client) Ping

func (c *Client) Ping() (bool, error)

func (*Client) Subdomains

func (c *Client) Subdomains(domain string, subdomainsOnly, includeInactive bool) (resp SubdomainResponse, err error)

Subdomains returns a list of subdomains for a given domain. If subdomainsOnly is true, only subdomains are returned. If includeInactive is true, inactive subdomains are included.

type DNSRecordResponse

type DNSRecordResponse struct {
	FirstSeen string                   `json:"first_seen"`
	Values    []map[string]interface{} `json:"values"`
}

type DNSResponse

type DNSResponse struct {
	A    DNSRecordResponse `json:"a"`
	AAAA DNSRecordResponse `json:"aaaa"`
	MX   DNSRecordResponse `json:"mx"`
	NS   DNSRecordResponse `json:"ns"`
	SOA  DNSRecordResponse `json:"soa"`
	TXT  DNSRecordResponse `json:"txt"`
}

type DomainDetailsResponse

type DomainDetailsResponse struct {
	AlexaRank      int         `json:"alexa_rank"`
	ApexDomain     string      `json:"apex_domain"`
	CurrentDNS     DNSResponse `json:"current_dns"`
	Endpoint       string      `json:"endpoint"`
	Hostname       string      `json:"hostname"`
	SubdomainCount int         `json:"subdomain_count"`
}

type MetaResponse

type MetaResponse struct {
	LimitReached bool `json:"limit_reached"`
}

type SubdomainResponse

type SubdomainResponse struct {
	Endpoint       string       `json:"endpoint"`
	Meta           MetaResponse `json:"meta"`
	SubdomainCount int          `json:"subdomain_count"`
	Subdomains     []string     `json:"subdomains"`
}

Jump to

Keyboard shortcuts

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