Documentation
¶
Overview ¶
Package runner implements the mechanism to drive the domain enumeration process
Index ¶
- Constants
- func GetUpdateCallback() func()
- func ParseDiscoveryMode(value string) source.DiscoveryMode
- func UnmarshalFrom(file string) error
- type OnResultCallback
- type Options
- type OutputWriter
- func (o *OutputWriter) WriteHost(input string, results map[string]resolve.HostEntry, writer io.Writer) error
- func (o *OutputWriter) WriteHostIP(input string, results map[string]resolve.Result, writer io.Writer) error
- func (o *OutputWriter) WriteHostNoWildcard(input string, results map[string]resolve.Result, writer io.Writer) error
- func (o *OutputWriter) WriteSourceHost(input string, sourceMap map[string]map[string]struct{}, writer io.Writer) error
- type Runner
- func (r *Runner) EnumerateMultipleQueries(reader io.Reader, writers []io.Writer) error
- func (r *Runner) EnumerateMultipleQueriesWithCtx(ctx context.Context, reader io.Reader, writers []io.Writer) error
- func (r *Runner) EnumerateSingleQuery(query string, writers []io.Writer) error
- func (r *Runner) EnumerateSingleQueryWithCtx(ctx context.Context, query string, writers []io.Writer) error
- func (r *Runner) RunEnumeration() error
- func (r *Runner) RunEnumerationWithCtx(ctx context.Context) error
Constants ¶
const ToolName = `tldfinder`
Name
Variables ¶
This section is empty.
Functions ¶
func GetUpdateCallback ¶
func GetUpdateCallback() func()
GetUpdateCallback returns a callback function that updates tldfinder
func ParseDiscoveryMode ¶
func ParseDiscoveryMode(value string) source.DiscoveryMode
func UnmarshalFrom ¶
UnmarshalFrom writes the marshaled yaml config to disk
Types ¶
type OnResultCallback ¶
OnResultCallback (hostResult)
type Options ¶
type Options struct { Verbose bool // Verbose flag indicates whether to show verbose output or not NoColor bool // NoColor disables the colored output JSON bool // JSON specifies whether to use json for output format or text file HostIP bool // HostIP specifies whether to write domains in host:ip format Silent bool // Silent suppresses any extra text and only writes domains to screen ListSources bool // ListSources specifies whether to list all available sources RemoveWildcard bool // RemoveWildcard specifies whether to remove potential wildcard or dead domains from the results. CaptureSources bool // CaptureSources specifies whether to save all sources that returned a specific domains or just the first source Stdin bool // Stdin specifies whether stdin input was given to the process Version bool // Version specifies if we should just show version and exit DiscoveryMode source.DiscoveryMode // Mode specifies mode of discovery All bool // All specifies whether to use all (slow) sources. Statistics bool // Statistics specifies whether to report source statistics Threads int // Threads controls the number of threads to use for active enumerations Timeout int // Timeout is the seconds to wait for sources to respond MaxEnumerationTime int // MaxEnumerationTime is the maximum amount of time in minutes to wait for enumeration Domain goflags.StringSlice // Domain is the domain to find domains for Output io.Writer OutputFile string // Output is the file to write found domains to. OutputDirectory string // OutputDirectory is the directory to write results to in case list of domains is given Sources goflags.StringSlice `yaml:"sources,omitempty"` // Sources contains a comma-separated list of sources to use for enumeration ExcludeSources goflags.StringSlice `yaml:"exclude-sources,omitempty"` // ExcludeSources contains the comma-separated sources to not include in the enumeration process Resolvers goflags.StringSlice `yaml:"resolvers,omitempty"` // Resolvers is the comma-separated resolvers to use for enumeration ResolverList string // ResolverList is a text file containing list of resolvers to use for enumeration Config string // Config contains the location of the config file ProviderConfig string // ProviderConfig contains the location of the provider config file Proxy string // HTTP proxy RateLimit int // Global maximum number of HTTP requests to send per second RateLimits goflags.RateLimitMap // Maximum number of HTTP requests to send per second ExcludeIps bool Match goflags.StringSlice Filter goflags.StringSlice ResultCallback OnResultCallback // OnResult callback DisableUpdateCheck bool // DisableUpdateCheck disable update checking // contains filtered or unexported fields }
Options contains the configuration options for tuning the domain enumeration process.
func ParseOptions ¶
func ParseOptions() *Options
ParseOptions parses the command line flags provided by a user
type OutputWriter ¶
type OutputWriter struct {
JSON bool
}
OutputWriter outputs content to writers.
func NewOutputWriter ¶
func NewOutputWriter(json bool) *OutputWriter
NewOutputWriter creates a new OutputWriter
func (*OutputWriter) WriteHost ¶
func (o *OutputWriter) WriteHost(input string, results map[string]resolve.HostEntry, writer io.Writer) error
WriteHost writes the output list of domain to an io.Writer
func (*OutputWriter) WriteHostIP ¶
func (o *OutputWriter) WriteHostIP(input string, results map[string]resolve.Result, writer io.Writer) error
WriteHostIP writes the output list of domain to an io.Writer
func (*OutputWriter) WriteHostNoWildcard ¶
func (o *OutputWriter) WriteHostNoWildcard(input string, results map[string]resolve.Result, writer io.Writer) error
WriteHostNoWildcard writes the output list of domain with nW flag to an io.Writer
func (*OutputWriter) WriteSourceHost ¶
func (o *OutputWriter) WriteSourceHost(input string, sourceMap map[string]map[string]struct{}, writer io.Writer) error
WriteSourceHost writes the output list of domain to an io.Writer
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is an instance of the domain enumeration client used to orchestrate the whole process.
func NewRunner ¶
NewRunner creates a new runner struct instance by parsing the configuration options, configuring sources, reading lists and setting up loggers, etc.
func (*Runner) EnumerateMultipleQueries ¶
EnumerateMultipleQueries wraps EnumerateMultipleDomainsWithCtx with an empty context
func (*Runner) EnumerateMultipleQueriesWithCtx ¶
func (r *Runner) EnumerateMultipleQueriesWithCtx(ctx context.Context, reader io.Reader, writers []io.Writer) error
EnumerateMultipleQueriesWithCtx enumerates domains for multiple queries We keep enumerating domains for a given query until we reach an error
func (*Runner) EnumerateSingleQuery ¶
EnumerateSingleQuery wraps EnumerateSingleQuerynWithCtx with an empty context
func (*Runner) EnumerateSingleQueryWithCtx ¶
func (r *Runner) EnumerateSingleQueryWithCtx(ctx context.Context, query string, writers []io.Writer) error
EnumerateSingleQueryWithCtx performs domain enumeration against a single query
func (*Runner) RunEnumeration ¶
RunEnumeration wraps RunEnumerationWithCtx with an empty context