ssh

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Label = "Ssh"

Variables

This section is empty.

Functions

func CheckSetup

func CheckSetup() error

CheckSetup checks whether Setup() executed accordingly. Scan arguments should be checked by the scanner.

func Setup

func Setup(logger utils.Logger) error

Setup configures the environment accordingly, if the scan module has some special requirements. A successful setup is required before a scan can be started.

Types

type FakeClient

type FakeClient struct{}

We need to define a fake gssapi client in order to let Go test for this authentication method

func (*FakeClient) DeleteSecContext

func (f *FakeClient) DeleteSecContext() error

func (*FakeClient) GetMIC

func (f *FakeClient) GetMIC(micField []byte) ([]byte, error)

func (*FakeClient) InitSecContext

func (f *FakeClient) InitSecContext(target string, token []byte, isGSSDelegCreds bool) (outputToken []byte, needContinue bool, err error)

type Result

type Result struct {
	Data      *ResultData
	Status    string // Final scan status (success or graceful error). Should be stored along with the scan results.
	Exception bool   // Indicates if something went wrong badly and results shall be discarded. This should never be

}

type ResultData

type ResultData struct {
	AuthenticationMechanisms   []string
	KeyExchangeAlgorithms      []string
	ServerKeyAlgorithms        []string
	ServerEncryptionAlgorithms []string
	ServerMacAlgorithms        []string
	ServerCompressAlgorithms   []string
	UsesGuessedKeyExchange     bool
	ProtocolVersion            string
}

type Scanner

type Scanner struct {
	Label    string
	Started  time.Time
	Finished time.Time
	// contains filtered or unexported fields
}

func NewScanner

func NewScanner(
	logger utils.Logger,
	target string,
	port int,
	dialTimeout time.Duration,
) (*Scanner, error)

func (*Scanner) Run

func (s *Scanner) Run(timeout time.Duration) (res *Result)

Run starts scan execution. This must either be executed as a goroutine, or another thread must be active listening on the scan's result channel, in order to avoid a deadlock situation.

Jump to

Keyboard shortcuts

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