hydra

package
v0.0.0-...-509a8f4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolInvalid                 loginType = "ProtocolInvalid"
	UsernameAndPassword                       = "UsernameAndPassword"
	OnlyPassword                              = "OnlyPassword"
	UnauthorizedAccessVulnerability           = "UnauthorizedAccessVulnerability"
)

Variables

View Source
var (
	DefaultAuthMap map[string]*AuthList
	CustomAuthMap  *AuthList
	ProtocolList   = []string{
		"ssh", "rdp", "ftp", "smb", "telnet",
		"mysql", "mssql", "oracle", "postgresql", "mongodb", "redis",
	}
	LoginFailedErr = errors.New("login failed")
	ProtocolErr    = errors.New("protocol error")
)
View Source
var UnauthorizedAccessVulnerabilityAuth = NewAuth()

Functions

func InitCustomAuthMap

func InitCustomAuthMap(user, pass []string)

func InitDefaultAuthMap

func InitDefaultAuthMap()

func Ok

func Ok(protocol string) bool

Types

type Auth

type Auth struct {
	Username string
	Password string
	Other    map[string]string
}

func NewAuth

func NewAuth() Auth

func NewAuthFromPasswords

func NewAuthFromPasswords(passwords []string) []Auth

func NewAuthFromUsernameAndPassword

func NewAuthFromUsernameAndPassword(usernames, passwords []string) []Auth

func NewSpecialAuth

func NewSpecialAuth(username, password string) Auth

func (*Auth) MakePassword

func (a *Auth) MakePassword()

func (*Auth) Map

func (a *Auth) Map() map[string]string

type AuthInfo

type AuthInfo struct {
	Protocol string
	Port     int
	IPAddr   string
	Auth     Auth
	Status   bool
}

func NewAuthInfo

func NewAuthInfo(IPAddr string, Port int, Protocol string) *AuthInfo

func (*AuthInfo) Display

func (a *AuthInfo) Display() string

type AuthList

type AuthList struct {
	Username []string
	Password []string
	Special  []Auth
}

func DefaultFtpList

func DefaultFtpList() *AuthList

func DefaultMongodbList

func DefaultMongodbList() *AuthList

func DefaultMssqlList

func DefaultMssqlList() *AuthList

func DefaultMysqlList

func DefaultMysqlList() *AuthList

func DefaultOracleList

func DefaultOracleList() *AuthList

func DefaultPostgresqlList

func DefaultPostgresqlList() *AuthList

func DefaultRdpList

func DefaultRdpList() *AuthList

func DefaultRedisList

func DefaultRedisList() *AuthList

func DefaultSmbList

func DefaultSmbList() *AuthList

func DefaultSshList

func DefaultSshList() *AuthList

func DefaultTelnetList

func DefaultTelnetList() *AuthList

func NewAuthList

func NewAuthList() *AuthList

func (*AuthList) Dict

func (a *AuthList) Dict(onlyPassword bool) []Auth

func (*AuthList) IsEmpty

func (a *AuthList) IsEmpty() bool

func (*AuthList) Length

func (a *AuthList) Length() int

func (*AuthList) Merge

func (a *AuthList) Merge(list *AuthList)

func (*AuthList) Replace

func (a *AuthList) Replace(list *AuthList)

type Cracker

type Cracker struct {
	Pool *pool.Pool

	SuccessCount int32
	SuccessAuth  Auth
	// contains filtered or unexported fields
}

func NewCracker

func NewCracker(info *AuthInfo, isAuthUpdate bool, threads int) *Cracker

func (*Cracker) Retries

func (c *Cracker) Retries(i int)

func (*Cracker) Run

func (c *Cracker) Run() (*Auth, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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