engine

package
v0.0.0-...-9fede7b Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SeverityColor defines the colors for the levels output by the ColorWriter.
	SeverityColor = map[loggo.Level]*ansiterm.Context{
		loggo.TRACE:   ansiterm.Foreground(ansiterm.Default),
		loggo.DEBUG:   ansiterm.Foreground(ansiterm.Green),
		loggo.INFO:    ansiterm.Foreground(ansiterm.BrightBlue),
		loggo.WARNING: ansiterm.Foreground(ansiterm.Yellow),
		loggo.ERROR:   ansiterm.Foreground(ansiterm.BrightRed),
		loggo.CRITICAL: &ansiterm.Context{
			Foreground: ansiterm.White,
			Background: ansiterm.Red,
		},
	}
	// LocationColor defines the colors for the location output by the ColorWriter.
	LocationColor = ansiterm.Foreground(ansiterm.BrightBlue)
)
View Source
var Logger = GetLogger("pentest")

Functions

func AddExtractor

func AddExtractor(e Extractor)

func AddIP

func AddIP(ip string, origin interface{})

func AddPassword

func AddPassword(password string, origin interface{})

func AddPort

func AddPort(port uint16, origin interface{})

func AddResultCredentials

func AddResultCredentials(creds Credentials)

func AddResultTarget

func AddResultTarget(target Target)

func AddTestResult

func AddTestResult(tester Tester, target Target, data interface{})

func AddTester

func AddTester(tester Tester)

func AddUsername

func AddUsername(username string, origin interface{})

func CheckTargets

func CheckTargets(workers int)

func GenerateCredentials

func GenerateCredentials() <-chan Credentials

func GenerateTarget

func GenerateTarget() <-chan Target

func GetIPsByOrigin

func GetIPsByOrigin(origin interface{}) []string

func GetLogger

func GetLogger(name string) loggo.Logger

func GetPasswordsByOrigin

func GetPasswordsByOrigin(origin interface{}) []string

func GetPortsByOrigin

func GetPortsByOrigin(origin interface{}) []uint16

func GetUsernamesByOrigin

func GetUsernamesByOrigin(origin interface{}) []string

func MarshallResult

func MarshallResult() string

func NewWriter

func NewWriter(writer io.Writer) loggo.Writer

Writer will write out colored severity levels if the writer is outputting to a terminal.

func PrintSummary

func PrintSummary()

func SetRBACVulnerable

func SetRBACVulnerable(vulnerable bool)

Types

type Credentials

type Credentials struct {
	Username string
	Password string
}

type Extractor

type Extractor interface {
	Extract()
	Summary()
}

func GetExtractors

func GetExtractors() []Extractor

type Origin

type Origin struct {
	Origin interface{}
}

type OriginString

type OriginString struct {
	Origin
	// contains filtered or unexported fields
}

type OriginUint16

type OriginUint16 struct {
	Origin
	// contains filtered or unexported fields
}

type ResultTarget

type ResultTarget map[string][]uint16

type Results

type Results struct {
	sync.RWMutex
	IsRBACVulnerable bool          `json:"rbac-vulnearable"`
	Targets          ResultTarget  `json:"targets"`
	Credentials      []Credentials `json:"credentials"`
	Testers          TestResult    `json:"testers"`
}

type Target

type Target struct {
	IP   string
	Port uint16
}

func (Target) String

func (t Target) String() string

type TestResult

type TestResult map[string][]TestTargetResult

type TestTargetResult

type TestTargetResult struct {
	Target Target      `json:"target"`
	Data   interface{} `json:"data"`
}

type Tester

type Tester interface {
	Test(target Target)
}

func GetTesters

func GetTesters() []Tester

Jump to

Keyboard shortcuts

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