Documentation ¶
Index ¶
Constants ¶
const ( ErrUpgradedError = 1 << iota ErrNoWebservers ErrApacheFetchVhosts ErrApacheInvalidVhosts ErrApacheParseVhosts ErrApacheNoEntries ErrNotImplemented ErrInvalidURL )
map each error name to a unique id
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Domain ¶
Domain represents a domain we should be checking, including the necessary data to fetch it, with the included host/port proxiable op, and public ip
type DomainFilter ¶
type DomainFilter struct { IgnoreHTTP bool // ignore ^http urls IgnoreHTTPS bool // ignore ^https urls IgnoreMatch string // ignore urls matching glob MatchOnly string // ignore urls not matching glob }
DomainFilter filters Finder.Domains based on query input
type Finder ¶
type Finder struct { // Procs is a list of procs that should match up to a running webserver. these // should all have bound tcp (4) sockets. Procs []*procfinder.Process // MainProc represents the main process which we are pulling information from. MainProc *procfinder.Process // Domains represents the list of domains that are valid and should be crawled. Domains []*Domain // Log is a logger which we should dump debugging info to. Log *log.Logger }
Finder represents the entire domain crawl process to find domains that the server is actually hosting.
func (*Finder) Filter ¶
func (f *Finder) Filter(cnf DomainFilter)
Filter allows end users to filter out domains from the automated domain search functionality
func (*Finder) GetDomains ¶
GetDomains represents all of the domains that the current webserver has virtual hosts for.
func (*Finder) GetMainWebserver ¶
func (f *Finder) GetMainWebserver()
GetMainWebserver returns only one webserver which we should be pulling data from.
func (*Finder) GetWebservers ¶
GetWebservers pulls only the web server processes from the process list on the server.
func (*Finder) ReadApacheVhosts ¶
ReadApacheVhosts interprets and parses the "httpd -S" directive entries. docs: http://httpd.apache.org/docs/current/vhosts/#directives
func (*Finder) ReadCpanelVars ¶
ReadCpanelVars crawls through /var/cpanel/userdata/ and returns all valid domains/ports that the cPanel server is hosting
type NewErr ¶
type NewErr struct { Code int // contains filtered or unexported fields }
NewErr is a custom error struct representing the error with additional information
func UpgradeErr ¶
UpgradeErr takes a standard error interface and upgrades it to our custom error types