etcshadow

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package etcshadow implements a detector for weak/guessable passwords stored in /etc/shadow.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotCracked = errors.New("not cracked")

ErrNotCracked returned when a cracker did not find a matching password.

Functions

This section is empty.

Types

type Cracker

type Cracker interface {
	// Crack returns (password,nil) on success and ("", ErrNotCracked) on failure.
	Crack(context.Context, string) (string, error)
}

Cracker interface is implemented by types which know how to crack hashes.

func NewPasswordCracker

func NewPasswordCracker() Cracker

NewPasswordCracker returns a cracker that can attempt to find the password for a given hash.

type Detector

type Detector struct{}

Detector is a SCALIBR Detector for weak/guessable passwords from /etc/shadow.

func (Detector) Name

func (Detector) Name() string

Name of the detector.

func (Detector) RequiredExtractors

func (Detector) RequiredExtractors() []string

RequiredExtractors returns an empty list as there are no dependencies.

func (Detector) Scan

Scan starts the scan.

func (Detector) ScanFS

ScanFS starts the scan from a pseudo-filesystem.

func (Detector) Version

func (Detector) Version() int

Version of the detector.

Jump to

Keyboard shortcuts

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