generators

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AttackTypes = map[string]Type{
	"sniper":      Sniper,
	"pitchfork":   PitchFork,
	"clusterbomb": ClusterBomb,
}

AttackTypes is an table for conversion of attack type from string.

Functions

func ClusterbombGenerator

func ClusterbombGenerator(payloads map[string][]string) (out chan map[string]interface{})

ClusterbombGenerator Attack - Generate all possible combinations from an input map with all values listed as slices of the same size

func CopyMap

func CopyMap(originalMap map[string]interface{}) map[string]interface{}

CopyMap creates a new copy of an existing map

func CopyMapWithDefaultValue

func CopyMapWithDefaultValue(originalMap map[string][]string, defaultValue interface{}) map[string]interface{}

CopyMapWithDefaultValue creates a new copy of an existing map and set a default value

func FileExists

func FileExists(filename string) bool

FileExists checks if a file exists and is not a directory

func HelperFunctions

func HelperFunctions() (functions map[string]govaluate.ExpressionFunction)

HelperFunctions contains the dsl functions

func LoadFile

func LoadFile(filepath string) (lines []string)

LoadFile into slice of strings

func LoadWordlists

func LoadWordlists(payloads map[string]string) map[string][]string

LoadWordlists creating proper data structure

func MergeMaps

func MergeMaps(m1, m2 map[string]interface{}) (m map[string]interface{})

MergeMaps into a new one

func PitchforkGenerator

func PitchforkGenerator(payloads map[string][]string) (out chan map[string]interface{})

PitchforkGenerator Attack - Generate positional combinations from an input map with all values listed as slices of the same size

func SniperGenerator

func SniperGenerator(payloads map[string][]string) (out chan map[string]interface{})

SniperGenerator Attack - Generate sequential combinations

func StreamFile

func StreamFile(filepath string) (content chan string)

StreamFile content to a chan

func StringContainsAnyMapItem

func StringContainsAnyMapItem(m map[string]interface{}, s string) bool

StringContainsAnyMapItem verifies is a string contains any value of a map

func TrimDelimiters

func TrimDelimiters(s string) string

TrimDelimiters removes trailing brackets

Types

type Type

type Type int

Type is type of attack

const (
	// Sniper attack - each variable replaced with values at a time
	Sniper Type = iota + 1
	// PitchFork attack - Each variable replaced with positional value in multiple wordlists
	PitchFork
	// ClusterBomb attack - Generate all possible combinations of values
	ClusterBomb
)

Jump to

Keyboard shortcuts

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