Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultUserAgent() string
- func GetRandomUserAgent() (string, error)
- func GetVersion() string
- func ParseExtensionsFile(file string) ([]string, error)
- type BasicHTTPOptions
- type Gobuster
- type GobusterPlugin
- type Guess
- type HTTPClient
- type HTTPHeader
- type HTTPOptions
- type Logger
- func (l Logger) Debug(v ...any)
- func (l Logger) Debugf(format string, v ...any)
- func (l Logger) Error(v ...any)
- func (l Logger) Errorf(format string, v ...any)
- func (l Logger) Fatal(v ...any)
- func (l Logger) Fatalf(format string, v ...any)
- func (l Logger) Fatalln(v ...any)
- func (l Logger) Info(v ...any)
- func (l Logger) Infof(format string, v ...any)
- func (l Logger) Print(v ...any)
- func (l Logger) Printf(format string, v ...any)
- func (l Logger) Println(v ...any)
- func (l Logger) Warn(v ...any)
- func (l Logger) Warnf(format string, v ...any)
- type Message
- type MessageLevel
- type Options
- type ProcessFunc
- type Progress
- type RequestOptions
- type Result
- type ResultToStringFunc
- type Set
- type SetupFunc
- type Wordlist
Constants ¶
const PATTERN = "{GOBUSTER}"
PATTERN is the pattern for wordlist replacements in pattern file
const (
// VERSION contains the current gobuster version
VERSION = "3.8.2"
)
Variables ¶
Functions ¶
func DefaultUserAgent ¶
func DefaultUserAgent() string
DefaultUserAgent returns the default user agent to use in HTTP requests
func GetRandomUserAgent ¶ added in v3.6.0
GetRandomUserAgent picks a random user agent from a predefined list
func GetVersion ¶ added in v3.7.0
func GetVersion() string
func ParseExtensionsFile ¶ added in v3.6.0
Types ¶
type BasicHTTPOptions ¶ added in v3.1.0
type BasicHTTPOptions struct {
UserAgent string
Proxy string
NoTLSValidation bool
Timeout time.Duration
RetryOnTimeout bool
RetryAttempts int
TLSCertificate *tls.Certificate
TLSRenegotiation bool
LocalAddr *net.TCPAddr
}
BasicHTTPOptions defines only core http options
type Gobuster ¶
type Gobuster struct {
Opts *Options
Logger *Logger
Progress *Progress
// contains filtered or unexported fields
}
Gobuster is the main object when creating a new run
func NewGobuster ¶
func NewGobuster(opts *Options, plugin GobusterPlugin, logger *Logger) (*Gobuster, error)
NewGobuster returns a new Gobuster object
func (*Gobuster) GetConfigString ¶
GetConfigString returns the current config as a printable string
type GobusterPlugin ¶
type GobusterPlugin interface {
Name() string
PreRun(context.Context, *Progress) error
ProcessWord(context.Context, string, *Progress) (Result, error)
AdditionalWords(string) []string
AdditionalWordsLen() int
AdditionalSuccessWords(string) []string
GetConfigString() (string, error)
}
GobusterPlugin is an interface which plugins must implement
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient represents a http object
func NewHTTPClient ¶
func NewHTTPClient(opt *HTTPOptions, logger *Logger) (*HTTPClient, error)
NewHTTPClient returns a new HTTPClient
func (*HTTPClient) Request ¶ added in v3.1.0
func (client *HTTPClient) Request(ctx context.Context, fullURL url.URL, opts RequestOptions) (int, int64, http.Header, []byte, error)
Request makes a http request and returns the status, the content length, the headers, the body and an error if you want the body returned set the corresponding property inside RequestOptions
type HTTPHeader ¶
HTTPHeader holds a single key value pair of a HTTP header
type HTTPOptions ¶
type HTTPOptions struct {
BasicHTTPOptions
Password string
URL *url.URL
Username string
Cookies string
Headers []HTTPHeader
NoCanonicalizeHeaders bool
FollowRedirect bool
Method string
}
HTTPOptions is the struct to pass in all http options to Gobuster
type Message ¶ added in v3.6.0
type Message struct {
Level MessageLevel
Message string
}
type MessageLevel ¶ added in v3.6.0
type MessageLevel int
const ( LevelDebug MessageLevel = iota LevelInfo LevelWarn LevelError )
type Options ¶
type Options struct {
Threads int
Debug bool
Wordlist string
WordlistOffset int
PatternFile string
DiscoverPatternFile string
Patterns []string
DiscoverPatterns []string
OutputFilename string
NoProgress bool
NoError bool
Quiet bool
Delay time.Duration
}
Options holds all options that can be passed to libgobuster
type ProcessFunc ¶
ProcessFunc is the "process" function prototype for implementations
type Progress ¶ added in v3.2.0
type Progress struct {
ResultChan chan Result
ErrorChan chan error
MessageChan chan Message
// contains filtered or unexported fields
}
func NewProgress ¶ added in v3.2.0
func NewProgress() *Progress
func (*Progress) IncrementTotalRequests ¶ added in v3.2.0
func (*Progress) RequestsExpected ¶ added in v3.2.0
func (*Progress) RequestsIssued ¶ added in v3.2.0
type RequestOptions ¶ added in v3.1.0
type RequestOptions struct {
Host string
Body io.Reader
ReturnBody bool
ModifiedHeaders []HTTPHeader
UpdatedBasicAuthUsername string
UpdatedBasicAuthPassword string
}
RequestOptions is used to pass options to a single individual request
type ResultToStringFunc ¶
ResultToStringFunc is the "to string" function prototype for implementations
type Set ¶ added in v3.2.0
type Set[T comparable] struct { Set map[T]bool }
Set is a set of Ts
func NewSet ¶ added in v3.2.0
func NewSet[T comparable]() Set[T]
NewSet creates a new initialized Set
func ParseCommaSeparatedInt ¶ added in v3.6.0
ParseCommaSeparatedInt parses the status codes provided as a comma separated list
func ParseExtensions ¶ added in v3.6.0
ParseExtensions parses the extensions provided as a comma separated list
func (*Set[T]) AddRange ¶ added in v3.2.0
func (set *Set[T]) AddRange(ss []T)
AddRange adds a list of elements to a set
func (*Set[T]) ContainsAny ¶ added in v3.2.0
ContainsAny checks if any of the elements exist