dictionary

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: 9 Imported by: 0

Documentation

Overview

Package dictionary holds logic for Dictionary cracking attacks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dictionary

type Dictionary struct {
	Words [][]byte
}

Dictionary is the negine for the Dictionary attack.

func New

func New(src string) (*Dictionary, error)

New creates a *Dictionary struct from a dictionary file source.

func (*Dictionary) Crack

func (d *Dictionary) Crack(hash []byte, salt []byte, s *Strategy) *Result

Crack executes a Dictionary attack.

type Interface

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

Interface defines the public API for Dictionary.

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
	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