processor

package
v0.0.0-...-32fb935 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "0.3.0"

Variables

This section is empty.

Functions

func AppendIfHostMissing

func AppendIfHostMissing(slice []string, key string) []string

func AppendIfMissing

func AppendIfMissing(entries []string, key string) []string

func AppendIfMissingAll

func AppendIfMissingAll(entries []string, keys ...string) []string

func ExtractTLDAndSubdomainFromString

func ExtractTLDAndSubdomainFromString(str string) (string, string)

func GetDocumentFromFile

func GetDocumentFromFile(filename string) *jsonquery.Node

Types

type Config

type Config struct {
	ProjectsPath     string `yaml:"projects_path,omitempty"`
	HttpxDomainsFile string `yaml:"httpx_domains,omitempty"`
	DpuxFile         string `yaml:"dpux,omitempty"`
	DpuxIPFile       string `yaml:"dpux_ip,omitempty"`
}

type DKIM

type DKIM struct {
	Selector string
	TXT      string
	CNAME    string
}

type DNSRecord

type DNSRecord struct {
	Host          string   `json:"Host"`
	CNAME         []string `json:"CNAMES,omitempty"`
	IPv4Addresses []string `json:"IPv4Addresses,omitempty"`
	IPv6Addresses []string `json:"IPv6Addresses,omitempty"`
	WhoisInfo     string   `json:"WhoisInfo,omitempty"`
}

func AppendDNSRecordIfMissing

func AppendDNSRecordIfMissing(slice []DNSRecord, key DNSRecord) []DNSRecord

func CreateSimpleDNSEntryFromDPUX

func CreateSimpleDNSEntryFromDPUX(record *jsonquery.Node) DNSRecord

func GetDNSRecordForHostname

func GetDNSRecordForHostname(document *jsonquery.Node, hostname string) DNSRecord

func GetDNSRecordForIPAddress

func GetDNSRecordForIPAddress(document *jsonquery.Node, ipaddress string) DNSRecord

type Duplicate

type Duplicate struct {
	Hostname       string   `json:"hostname,omitempty"`
	IP             string   `json:"ip,omitempty"`
	URL            string   `json:"url,omitempty"`
	BodyHash       string   `json:"bodyHash,omitempty"`
	ContentLength  int      `json:"contentLength,omitempty"`
	Lines          int      `json:"lines,omitempty"`
	Words          int      `json:"words,omitempty"`
	Status         int      `json:"status,omitempty"`
	DuplicateHosts []string `json:"duplicateHosts,omitempty"`
}

func AppendDuplicatesIfMissing

func AppendDuplicatesIfMissing(slice []Duplicate, key Duplicate) []Duplicate

type MailRecord

type MailRecord struct {
	Host        string   `json:"Host"`
	MXRecords   []string `json:"MXRecords"`
	SPFEntry    string   `json:"SPFEntry,omitempty"`
	DMARCEntry  []string `json:"DMARCEntry,omitempty"`
	DKIMEntries []DKIM   `json:"DKIMEntries,omitempty"`
	Infos       []string `json:"Infos,omitempty"`
}

type Options

type Options struct {
	SettingsFile    string
	Project         string
	File            string
	BaseFolder      string
	UniqueHostsFile string
	OnlyClean       bool
	OnlyDedup       bool
	UseCleanedDNS   bool
	Silent          bool
	Version         bool
	NoColor         bool
	Verbose         bool
	Debug           bool
}

func ParseOptions

func ParseOptions() *Options

ParseOptions parses the command line flags provided by a user

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

func NewProcessor

func NewProcessor(options *Options) (*Processor, error)

func (*Processor) CleanAndFind

func (p *Processor) CleanAndFind() error

func (*Processor) CleanDNSEntries

func (p *Processor) CleanDNSEntries()

func (*Processor) CleanDomains

func (p *Processor) CleanDomains(mailRecords []MailRecord, makeCLeanedDNS bool)

func (*Processor) CleanFile

func (p *Processor) CleanFile()

func (*Processor) FindMailRecords

func (p *Processor) FindMailRecords() []MailRecord

type SimpleHTTPXEntry

type SimpleHTTPXEntry struct {
	Host          string
	BodyHash      string
	Status        int
	ContentLength int
	Lines         int
	Words         int
	Input         string
	URL           string
	Title         string
}

func AppendHTTPXEntryIfMissing

func AppendHTTPXEntryIfMissing(entries []SimpleHTTPXEntry, key SimpleHTTPXEntry) []SimpleHTTPXEntry

func CreateSimpleHostEntryFromHTTPX

func CreateSimpleHostEntryFromHTTPX(entryValues map[string]interface{}) SimpleHTTPXEntry

func GetHTTPXEntryForIPAddress

func GetHTTPXEntryForIPAddress(document *jsonquery.Node, ipaddress string) []SimpleHTTPXEntry

Jump to

Keyboard shortcuts

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