runner

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HTTP defines the plain http scheme
	HTTP = "http"
	// HTTPS defines the secure http scheme
	HTTPS = "https"
	// HTTPorHTTPS defines both http and https scheme in mutual exclusion
	HTTPorHTTPS = "http|https"
	// HTTPandHTTPS defines both http and https scheme
	HTTPandHTTPS = "http&https"
)
View Source
const (
	HeaderKeyUserAgent     = "User-Agent"
	HeaderKeyCookie        = "Cookie"
	HeaderKeyAuthorization = "Authorization"
)
View Source
const (
	Version = `1.4.0`
)

Variables

View Source
var (
	PathScanMatchVersion, _ = util.GetMatchVersion(defaultMatchDir)
)

Functions

func CheckMatchVersion added in v1.2.1

func CheckMatchVersion() (error, bool)

func CheckVersion

func CheckVersion() error

func DefaultResumeFilePath

func DefaultResumeFilePath(filename string) string

func DefaultResumeFolderPath

func DefaultResumeFolderPath() string

func DownloadDict

func DownloadDict() error

func InitConfig

func InitConfig() error

func InitJs

func InitJs() error

func InitMatch

func InitMatch() error

func InitPathDict

func InitPathDict() error

func InitPathScan

func InitPathScan() error

func Match

func Match(data map[string]interface{}, matcher *matchers.Matcher) (bool, []string)

func UpdateHTMLTemplate added in v1.3.1

func UpdateHTMLTemplate() (bool, error)

func UpdateMatch

func UpdateMatch() (bool, error)

func UpdateVersion

func UpdateVersion() (bool, error)

Types

type Cached added in v1.4.0

type Cached struct {
	CachedString map[string]struct{} `json:"cached-string"`
	Lock         sync.RWMutex        `json:"-"`
}

func NewCached added in v1.4.0

func NewCached() *Cached

func (*Cached) HasInCached added in v1.4.0

func (c *Cached) HasInCached(path string) (ok bool)

func (*Cached) Set added in v1.4.0

func (c *Cached) Set(path string)

type Options

type Options struct {
	Url                       goflags.StringSlice         `json:"url"`
	UrlFile                   goflags.StringSlice         `json:"url-file"`
	UrlRemote                 string                      `json:"url-remote"`
	UrlChannel                bool                        `json:"url-channel"`
	Path                      goflags.StringSlice         `json:"path"`
	PathFile                  goflags.StringSlice         `json:"path-file"`
	PathRemote                string                      `json:"path-remote"`
	Subdomain                 bool                        `json:"subdomain"`
	ResumeCfg                 string                      `json:"resume-cfg"`
	Output                    string                      `json:"output"`
	RateLimit                 int                         `json:"rate-http"`
	Threads                   int                         `json:"thread"`
	Retries                   int                         `json:"retries"`
	Proxy                     string                      `json:"proxy"`
	ProxyAuth                 string                      `json:"proxy-auth"`
	NoColor                   bool                        `json:"no-color"`
	Verbose                   bool                        `json:"verbose"`
	Silent                    bool                        `json:"silent"`
	OnlyTargets               bool                        `json:"only-targets"`
	SkipUrl                   goflags.StringSlice         `json:"skip-url"`
	SkipCode                  goflags.StringSlice         `json:"skip-code"`
	SkipHash                  string                      `json:"skip-hash"`
	SkipBodyLen               int                         `json:"skip-body-len"`
	SkipHashMethod            string                      `json:"skip-hash-method"`
	ErrUseLastResponse        bool                        `json:"err-use-last-response"`
	Csv                       bool                        `json:"csv,omitempty"`
	ClearResume               bool                        `json:"clear-resume"`
	Html                      bool                        `json:"html,omitempty"`
	Version                   bool                        `json:"version"`
	Uncover                   bool                        `json:"uncover"`
	UncoverQuery              goflags.StringSlice         `json:"uncover-query"`
	UncoverEngine             goflags.StringSlice         `json:"uncover-engine"`
	UncoverDelay              int                         `json:"uncover-delay"`
	UncoverLimit              int                         `json:"uncover-limit"`
	UncoverField              string                      `json:"uncover-field"`
	UncoverOutput             string                      `json:"uncover-output"`
	UpdatePathScanVersion     bool                        `json:"update"`
	UpdatePathDictVersion     bool                        `json:"update-path-dict-version"`
	UserAgent                 goflags.StringSlice         `json:"user-agent"`
	Cookie                    string                      `json:"cookie"`
	Authorization             string                      `json:"authorization"`
	Header                    goflags.StringSlice         `json:"header"`
	HeaderFile                goflags.StringSlice         `json:"header-file"`
	Timeout                   int                         `json:"timeout"`
	UpdateMatchVersion        bool                        `json:"update-match-version"`
	UpdateHTMLTemplateVersion bool                        `json:"update-html-template-version"`
	Method                    goflags.StringSlice         `json:"method"`
	MatchPath                 string                      `json:"match-path"`
	RecursiveRun              bool                        `json:"recursive-run"`
	RecursiveRunTimes         int                         `json:"recursive-run-times"`
	GetHash                   bool                        `json:"get-hash"`
	FindOtherDomainList       goflags.StringSlice         `json:"find-other-domain-list"`
	ResultBack                func(result *result.Result) `json:"-"`
	NotInit                   bool                        `json:"not-init"`
	Body                      string                      `json:"body"`
	FindOtherDomain           bool                        `json:"find-other-domain"`
	SkipAutoUpdateMatch       bool                        `json:"skip-auto-update-match"`
	SubdomainLimit            int                         `json:"subdomain-limit"`
	SubdomainQuery            goflags.StringSlice         `json:"subdomain-query"`
	SubdomainEngine           goflags.StringSlice         `json:"subdomain-engine"`
}

func ParserOptions

func ParserOptions() *Options

func (*Options) Validate

func (o *Options) Validate() error

type ResumeCfg

type ResumeCfg struct {
	Rwm           *sync.RWMutex
	Options       *Options `json:"options"`
	ResultsCached *Cached  `json:"results-cached"`
	OutputCached  *Cached  `json:"output-cached"`
}

func ParserResumeCfg

func ParserResumeCfg(filename string) (*ResumeCfg, error)

func (*ResumeCfg) CleanupResumeConfig

func (cfg *ResumeCfg) CleanupResumeConfig()

func (*ResumeCfg) ClearResume

func (cfg *ResumeCfg) ClearResume()

func (*ResumeCfg) MarshalResume

func (cfg *ResumeCfg) MarshalResume(filename string) error

type Runner

type Runner struct {
	Cfg *ResumeCfg
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(options *Options) (*Runner, error)

func (*Runner) CheckSkip added in v1.4.0

func (r *Runner) CheckSkip(status int, contentLength int, body []byte) bool

func (*Runner) Close added in v1.3.0

func (r *Runner) Close()

func (*Runner) Do added in v1.4.0

func (r *Runner) Do(target, path string, method string) (map[string]interface{}, error)

func (*Runner) GetDNSData added in v1.4.0

func (r *Runner) GetDNSData(hostname string) (ips, cnames []string, err error)

func (*Runner) NewClient added in v1.4.0

func (r *Runner) NewClient() *defaultHttp.Client

func (*Runner) NewRequest added in v1.4.0

func (r *Runner) NewRequest(method string, url string, body interface{}) (*http.Request, error)

func (*Runner) NewRetryableClient added in v1.4.0

func (r *Runner) NewRetryableClient() *http.Client

func (*Runner) ParseOtherUrl

func (r *Runner) ParseOtherUrl(oldUrl string, domains []string, data ...[]byte) []string

func (*Runner) ParseTechnology

func (r *Runner) ParseTechnology(data map[string]interface{}) []string

func (*Runner) RunEnumeration added in v1.4.0

func (r *Runner) RunEnumeration() error

Jump to

Keyboard shortcuts

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