bruteforce

package
v0.0.0-...-9243063 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package bruteforce holds logic for Brute Force cracking attacks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bruteforce

type Bruteforce struct{}

Bruteforce is the engine for the Brute Force attack.

func New

func New() *Bruteforce

New creates a *Bruteforce struct.

func (*Bruteforce) Crack

func (b *Bruteforce) Crack(hash []byte, salt []byte, s *Strategy) *Result

Crack executes a Brute Force attack.

type Interface

type Interface interface {
	Crack(hash []byte, salt []byte, s *Strategy) *Result
}

Interface defines the public API for Bruteforce.

type Result

type Result struct {
	Ok        bool
	Hash      []byte
	Password  []byte
	Tries     int
	UsedCache bool
	Duration  time.Duration
}

Result represents the attack output.

type Strategy

type Strategy struct {
	Cipher    cipherlib.Interface
	Lowercase bool
	Uppercase bool
	Numbers   bool
	Special   bool
	Min       int
	Max       int
	Cache     *digestcache.DigestCache
}

Strategy defines options for the cracking.

Jump to

Keyboard shortcuts

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