config

package
v3.4.12 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

You can use the "packr clean" command to clean up this, and any other packr generated files.

Index

Constants

This section is empty.

Variables

View Source
var (
	// BoxOfDefaultFiles is the ./resources project directory embedded into the binary.
	BoxOfDefaultFiles *packr.Box
)

Functions

func AcquireConfig

func AcquireConfig(dir, file string, config *Config) error

AcquireConfig populates the Config struct provided by the config argument.

func GetListFromFile

func GetListFromFile(path string) ([]string, error)

GetListFromFile reads a wordlist text or gzip file and returns the slice of words.

func LookupASNsByName

func LookupASNsByName(s string) ([]*requests.ASNRequest, error)

LookupASNsByName returns requests.ASNRequest objects for autonomous systems with descriptions that contain the string provided by the parameter.

func OutputDirectory

func OutputDirectory(dir ...string) string

OutputDirectory returns the file path of the Amass output directory. A suitable path provided will be used as the output directory instead.

Types

type APIKey

type APIKey struct {
	Username string `ini:"username"`
	Password string `ini:"password"`
	Key      string `ini:"apikey"`
	Secret   string `ini:"secret"`
}

APIKey contains values required for authenticating with web APIs.

type Config

type Config struct {
	sync.Mutex

	// A Universally Unique Identifier (UUID) for the enumeration
	UUID uuid.UUID

	// Logger for error messages
	Log *log.Logger

	// The directory that stores the bolt db and other files created
	Dir string `ini:"output_directory"`

	// The settings for connecting with a Gremlin Server
	GremlinURL  string
	GremlinUser string
	GremlinPass string

	// The maximum number of concurrent DNS queries
	MaxDNSQueries int `ini:"maximum_dns_queries"`

	// Semaphore to enforce the maximum DNS queries
	SemMaxDNSQueries semaphore.Semaphore

	// Names provided to seed the enumeration
	ProvidedNames []string

	// The IP addresses specified as in scope
	Addresses []net.IP

	// CIDR that is in scope
	CIDRs []*net.IPNet

	// ASNs specified as in scope
	ASNs []int

	// The ports that will be checked for certificates
	Ports []int

	// The list of words to use when generating names
	Wordlist []string

	// Will the enumeration including brute forcing techniques
	BruteForcing bool

	// Will recursive brute forcing be performed?
	Recursive bool

	// Minimum number of subdomain discoveries before performing recursive brute forcing
	MinForRecursive int

	// Will discovered subdomain name alterations be generated?
	Alterations    bool
	FlipWords      bool
	FlipNumbers    bool
	AddWords       bool
	AddNumbers     bool
	MinForWordFlip int
	EditDistance   int
	AltWordlist    []string

	// Only access the data sources for names and return results?
	Passive bool

	// Determines if zone transfers will be attempted
	Active bool

	// Determines if unresolved DNS names will be output by the enumeration
	IncludeUnresolvable bool `ini:"include_unresolvable"`

	// A blacklist of subdomain names that will not be investigated
	Blacklist []string

	// A list of data sources that should not be utilized
	SourceFilter struct {
		Include bool // true = include, false = exclude
		Sources []string
	}

	// Resolver settings
	Resolvers           []string
	MonitorResolverRate bool
	ScoreResolvers      bool
	PublicDNS           bool

	// Enumeration Timeout
	Timeout int
	// contains filtered or unexported fields
}

Config passes along Amass configuration settings and options.

func NewConfig

func NewConfig() *Config

NewConfig returns a default configuration object.

func (*Config) AddAPIKey

func (c *Config) AddAPIKey(source string, ak *APIKey)

AddAPIKey adds the data source and API key association provided to the configuration.

func (*Config) AddDomain

func (c *Config) AddDomain(domain string)

AddDomain appends the domain name provided in the parameter to the list in the configuration.

func (*Config) AddDomains

func (c *Config) AddDomains(domains []string)

AddDomains appends the domain names provided in the parameter to the list in the configuration.

func (*Config) Blacklisted

func (c *Config) Blacklisted(name string) bool

Blacklisted returns true is the name in the parameter ends with a subdomain name in the config blacklist.

func (*Config) CheckSettings

func (c *Config) CheckSettings() error

CheckSettings runs some sanity checks on the configuration options selected.

func (*Config) DomainRegex

func (c *Config) DomainRegex(domain string) *regexp.Regexp

DomainRegex returns the Regexp object for the domain name identified by the parameter.

func (*Config) Domains

func (c *Config) Domains() []string

Domains returns the list of domain names currently in the configuration.

func (*Config) GetAPIKey

func (c *Config) GetAPIKey(source string) *APIKey

GetAPIKey returns the API key associated with the provided data source name.

func (*Config) IsAddressInScope

func (c *Config) IsAddressInScope(addr string) bool

IsAddressInScope returns true if the addr parameter matches provided network scope and when no network scope has been set.

func (*Config) IsDomainInScope

func (c *Config) IsDomainInScope(name string) bool

IsDomainInScope returns true if the DNS name in the parameter ends with a domain in the config list.

func (*Config) LoadSettings

func (c *Config) LoadSettings(path string) error

LoadSettings parses settings from an .ini file and assigns them to the Config.

func (*Config) UpdateConfig

func (c *Config) UpdateConfig(update Updater) error

UpdateConfig allows the provided Updater to update the current configuration.

func (*Config) WhichDomain

func (c *Config) WhichDomain(name string) string

WhichDomain returns the domain in the config list that the DNS name in the parameter ends with.

type Updater

type Updater interface {
	OverrideConfig(*Config) error
}

Updater allows an object to implement a method that updates a configuration.

Directories

Path Synopsis
You can use the "packr2 clean" command to clean up this, and any other packr generated files.
You can use the "packr2 clean" command to clean up this, and any other packr generated files.

Jump to

Keyboard shortcuts

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