ssh

package
v0.0.0-...-64f8f7d Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name = "ssh"
)

Functions

func Connect

func Connect(addr string, config *ssh.ClientConfig) (ok bool, err error)

Connect connects to the server using the provided ClientConfig

func ConnectWithCredential

func ConnectWithCredential(addr string, cred model.Credential, timeout time.Duration) (ok bool, err error)

ConnectWithCredential returns ok == true, if the credential work, else err is not nil

func ConnectWithPassword

func ConnectWithPassword(addr, user, passwd string, timeout time.Duration) (ok bool, err error)

ConnectWithCredential returns ok == true, if the credential work, else err is not nil

func GetAuthMethod

func GetAuthMethod(cred model.Credential) (ssh.AuthMethod, error)

GetAuthMethod returns the appropriate ssh.AuthMethod based on the provided Credentials

Types

type SSH

type SSH struct {
	//stuff
	Host string
	Port int

	// Options
	StopIfSuccess     bool
	StopIfNetErr      bool
	LogFailedAttempts bool
	// contains filtered or unexported fields
}

SSH defines configs for a specific target, which can be checked with credentials

func New

func New(host string, port int, sleep time.Duration, timeout time.Duration, logAttempts bool) *SSH

New creates a new SSH Bruter

func (*SSH) Add

func (bruter *SSH) Add(c model.Credential)

Add uses a credential pair for the connection blocking !

func (*SSH) Close

func (bruter *SSH) Close()

Close signals the target to cease all activity.

func (*SSH) GoStart

func (bruter *SSH) GoStart(threads int, outChan chan model.Result, errChan chan model.Err)

GoStart defines the amout of handlers per target and sets the out and err channels

Jump to

Keyboard shortcuts

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