runner

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 60 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.8`
)

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 DecodeData added in v1.4.2

func DecodeData(data []byte, headers http.Header) ([]byte, error)

ExtractTitle from a response

func DecodeKorean added in v1.4.2

func DecodeKorean(s []byte) ([]byte, error)

func Decodebig5 added in v1.4.2

func Decodebig5(s []byte) ([]byte, error)

Decodebig5 converts BIG5 to UTF-8

func Decodegbk added in v1.4.2

func Decodegbk(s []byte) ([]byte, error)

Decodegbk converts GBK to UTF-8

func DefaultResumeFilePath

func DefaultResumeFilePath(filename string) string

func DefaultResumeFolderPath

func DefaultResumeFolderPath() string

func Encodebig5 added in v1.4.2

func Encodebig5(s []byte) ([]byte, error)

Encodebig5 converts UTF-8 to BIG5

func GetDNSData added in v1.4.5

func GetDNSData(dialer *fastdialer.Dialer, hostname string) (ips, cnames []string, err error)

func InitConfig

func InitConfig() error

func InitMatch

func InitMatch() error

func InitPathScan

func InitPathScan() error

func Match

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

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                 goflags.StringSlice         `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"`
	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"`
	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"`
	SubdomainOutput             string                      `json:"subdomain-output"`
	Resolvers                   goflags.StringSlice         `json:"resolvers"`
	WaitTimeout                 int                         `json:"wait-timeout"`
	ProxyServerAllowHosts       goflags.StringSlice         `json:"proxy-server-allow-hosts"`
	ProxyServerCaPath           string                      `json:"proxy-server-ca-path"`
	ProxyServerStremLargeBodies int64                       `json:"proxy-server-strem-large-bodies"`
	ProxyServerAddr             string                      `json:"proxy-server-addr"`
	API                         bool                        `json:"api"`
	Favicon                     bool                        `json:"favicon"`
	SkipBodyRegex               goflags.StringSlice         `json:"skip-body-regex"`

	LoadDefaultDict   bool   `json:"load-default-dict"`
	LoadAPIDict       bool   `json:"load-api-dict"`
	Naabu             bool   `json:"naabu"`
	Ports             string `json:"ports"`
	TopPorts          string `json:"top-ports"`
	SkipHostDiscovery bool   `json:"skip-host-discovery"`
	NaabuOutput       string `json:"naabu-output"`
	NaabuRate         int    `json:"naabu-rate"`
	NaabuThreads      int    `json:"naabu-threads"`
	NaabuRetries      int    `json:"naabu-retries"`
	NaabuScanType     string `json:"naabu-scan-type"`
	// contains filtered or unexported fields
}

func ParserOptions

func ParserOptions() *Options

func (*Options) Validate

func (o *Options) Validate() error

type Response added in v1.4.2

type Response struct {
	Response      *defaultHttp.Response
	Raw           string
	RawData       []byte
	RawHeaders    string
	Headers       map[string][]string
	StatusCode    int
	ContentLength int
	Data          []byte
}

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) 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(ctx context.Context, 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) 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