internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CheckSource sourceType = iota + 1
	InitSource
	WordSource
	WafSource
)

Variables

View Source
var (
	CheckStatusCode func(int) bool
	CheckRedirect   func(string) bool
	CheckWaf        func([]byte) bool
)
View Source
var BlackStatus = []int{400, 404, 410}
View Source
var FuzzyStatus = []int{403, 500, 501, 502, 503}

Functions

func NewBaseline added in v0.1.0

func NewBaseline(u, host string, resp *ihttp.Response) *baseline

func NewInvalidBaseline added in v0.1.0

func NewInvalidBaseline(u, host string, resp *ihttp.Response) *baseline

func SliceContains added in v0.1.0

func SliceContains(s []string, e string) bool

Types

type ErrorType added in v0.1.0

type ErrorType uint
const (
	ErrBadStatus ErrorType = iota
	ErrWaf
	ErrRedirect
)

func (ErrorType) Error added in v0.1.0

func (e ErrorType) Error() string

type Option

type Option struct {
	URL               string   `short:"u" long:"url"`
	URLFile           string   `short:"l" long:"list"`
	Dictionaries      []string `short:"d" long:"dict"`
	Word              string   `short:"w" long:"word"`
	Extension         string   `short:"e" long:"extensions"`
	ExcludeExtensions string   `long:"exclude-extensions"`
	RemoveExtensions  string   `long:"remove-extensions"`
	Uppercase         bool     `short:"U" long:"uppercase"`
	Lowercase         bool     `short:"L" long:"lowercase"`

	Deadline    int      `long:"deadline" default:"600"` // todo 总的超时时间,适配云函数的deadline
	Timeout     int      `long:"timeout" default:"2"`
	Headers     []string `long:"header"`
	OutputFile  string   `short:"f"`
	OutputProbe string   `long:"probe"`
	Offset      int      `long:"offset"`
	Limit       int      `long:"limit"`
	Threads     int      `short:"t" long:"thread" default:"20"`
	PoolSize    int      `short:"p" long:"pool" default:"5"`
	Debug       bool     `long:"debug"`
	Quiet       bool     `short:"q" long:"quiet"`
	Mod         string   `short:"m" long:"mod" default:"path"`
	Client      string   `short:"c" long:"client" default:"auto"`
}

func (*Option) PrepareRunner added in v0.1.0

func (opt *Option) PrepareRunner() (*Runner, error)

func (*Option) Validate

func (opt *Option) Validate() bool

type Pool added in v0.1.0

type Pool struct {
	*pkg.Config
	// contains filtered or unexported fields
}

func NewPool added in v0.1.0

func NewPool(ctx context.Context, config *pkg.Config, outputCh chan *baseline) (*Pool, error)

func (*Pool) Close added in v0.1.0

func (p *Pool) Close()

func (*Pool) Init added in v0.1.0

func (p *Pool) Init() error

func (*Pool) PreCompare added in v0.1.0

func (p *Pool) PreCompare(resp *ihttp.Response) error

func (*Pool) Run added in v0.1.0

func (p *Pool) Run(ctx context.Context)

type Runner

type Runner struct {
	URLList  []string
	Wordlist []string
	Headers  http.Header
	Fns      []func(string) string
	Threads  int
	PoolSize int
	Pools    *ants.PoolWithFunc

	Timeout  int
	Mod      string
	OutputCh chan *baseline
	Progress *uiprogress.Progress
	// contains filtered or unexported fields
}

func (*Runner) Outputting added in v0.1.0

func (r *Runner) Outputting()

func (*Runner) Prepare

func (r *Runner) Prepare() error

func (*Runner) Run

func (r *Runner) Run()

type Unit added in v0.1.0

type Unit struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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