Documentation ¶
Overview ¶
Package runner implements the mechanism to drive the subdomain enumeration process
Index ¶
- func CheckConfigExists(configPath string) bool
- func GetConfigDirectory() (string, error)
- func WriteHostIPOutput(results map[string]string, writer io.Writer) error
- func WriteHostOutput(results map[string]struct{}, writer io.Writer) error
- func WriteJSONOutput(results map[string]string, writer io.Writer) error
- type ConfigFile
- type JSONResult
- type Options
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckConfigExists ¶
CheckConfigExists checks if the config file exists in the given path
func GetConfigDirectory ¶
GetConfigDirectory gets the subfinder config directory for a user
func WriteHostIPOutput ¶
WriteHostIPOutput writes the output list of subdomain to an io.Writer
func WriteHostOutput ¶
WriteHostOutput writes the output list of subdomain to an io.Writer
Types ¶
type ConfigFile ¶
type ConfigFile struct { // Resolvers contains the list of resolvers to use while resolving Resolvers []string `yaml:"resolvers,omitempty"` // Sources contains a list of sources to use for enumeration Sources []string `yaml:"sources,omitempty"` // ExcludeSources contains the sources to not include in the enumeration process ExcludeSources []string `yaml:"exclude-sources,omitempty"` // API keys for different sources Binaryedge []string `yaml:"binaryedge"` Censys []string `yaml:"censys"` Certspotter []string `yaml:"certspotter"` PassiveTotal []string `yaml:"passivetotal"` SecurityTrails []string `yaml:"securitytrails"` Shodan []string `yaml:"shodan"` URLScan []string `yaml:"urlscan"` Virustotal []string `yaml:"virustotal"` }
ConfigFile contains the fields stored in the configuration file
func UnmarshalRead ¶
func UnmarshalRead(file string) (ConfigFile, error)
UnmarshalRead reads the unmarshalled config yaml file from disk
func (ConfigFile) GetKeys ¶
func (c ConfigFile) GetKeys() subscraping.Keys
GetKeys gets the API keys from config file and creates a Keys struct We use random selection of api keys from the list of keys supplied. Keys that require 2 options are separated by colon (:).
func (ConfigFile) MarshalWrite ¶
func (c ConfigFile) MarshalWrite(file string) error
MarshalWrite writes the marshalled yaml config to disk
type JSONResult ¶
JSONResult contains the result for a host in JSON format
type Options ¶
type Options struct { Verbose bool // Verbose flag indicates whether to show verbose output or not NoColor bool // No-Color disables the colored output Threads int // Thread 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 mins to wait for enumeration Domain string // Domain is the domain to find subdomains for DomainsFile string // DomainsFile is the file containing list of domains to find subdomains for Output string // Output is the file to write found subdomains to. OutputDirectory string // OutputDirectory is the directory to write results to in case list of domains is given JSON bool // JSON specifies whether to use json for output format or text file HostIP bool // HostIP specifies whether to write subdomains in host:ip format Silent bool // Silent suppresses any extra text and only writes subdomains to screen Sources string // Sources contains a comma-separated list of sources to use for enumeration ExcludeSources string // ExcludeSources contains the comma-separated sources to not include in the enumeration process Resolvers string // 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 RemoveWildcard bool // RemoveWildcard specifies whether to remove potential wildcard or dead subdomains from the results. ConfigFile string // ConfigFile contains the location of the config file Stdin bool // Stdin specifies whether stdin input was given to the process YAMLConfig ConfigFile // YAMLConfig contains the unmarshalled yaml config file }
Options contains the configuration options for tuning the subdomain enumeration process.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is an instance of the subdomain 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) EnumerateMultipleDomains ¶
EnumerateMultipleDomains enumerates subdomains for multiple domains We keep enumerating subdomains for a given domain until we reach an error
func (*Runner) EnumerateSingleDomain ¶
EnumerateSingleDomain performs subdomain enumeration against a single domain