brutecat

package
v0.0.0-...-6bd64b1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	fmt.Stringer
	Authenticate(context.Context, Credentials) (bool, error)
	TestConnection(context.Context) error
}

type Credentials

type Credentials struct {
	Username string
	Password string
}

type Engine

type Engine struct {

	// Runner's callbacks
	OnErrorCallback   func(error)
	OnSuccessCallback func(Credentials)
	OnFailCallback    func(Credentials)

	// Stats
	RunStats *RunStats
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(users, passwords []string, threads uint16, authenticator Authenticator) (*Engine, error)

func NewEngineWithFiles

func NewEngineWithFiles(usersFile, passwordsFile string, threads uint16, authenticator Authenticator) (*Engine, error)

func (*Engine) Run

func (b *Engine) Run(ctx context.Context)

type RunStats

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

func NewStats

func NewStats(totalCredentials uint64) *RunStats

func (*RunStats) AddError

func (s *RunStats) AddError()

func (*RunStats) AddInvalidCredentials

func (s *RunStats) AddInvalidCredentials()

func (*RunStats) AddValidCredentials

func (s *RunStats) AddValidCredentials()

func (*RunStats) End

func (s *RunStats) End()

func (*RunStats) GetAverageCredentialsPerSecond

func (s *RunStats) GetAverageCredentialsPerSecond() float64

func (*RunStats) GetElapsedTime

func (s *RunStats) GetElapsedTime() time.Duration

func (*RunStats) GetEnd

func (s *RunStats) GetEnd() *time.Time

func (*RunStats) GetErrors

func (s *RunStats) GetErrors() uint64

func (*RunStats) GetInvalidCredentials

func (s *RunStats) GetInvalidCredentials() uint64

func (*RunStats) GetRemainingTime

func (s *RunStats) GetRemainingTime() time.Duration

func (*RunStats) GetStart

func (s *RunStats) GetStart() *time.Time

func (*RunStats) GetTotalCredentials

func (s *RunStats) GetTotalCredentials() uint64

func (*RunStats) GetTriedCredentials

func (s *RunStats) GetTriedCredentials() uint64

func (*RunStats) GetValidCredentials

func (s *RunStats) GetValidCredentials() uint64

func (*RunStats) Start

func (s *RunStats) Start()

func (*RunStats) String

func (s *RunStats) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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