Documentation
¶
Index ¶
- Constants
- Variables
- func ClusterBomb(payloads *IndexMap, callback func(varMap map[string]interface{}), ...)
- func Replace(template string, values map[string]interface{}) string
- type Config
- type DedupingWriter
- type IndexMap
- type Input
- type Mutator
- func (m *Mutator) DryRun() int
- func (m *Mutator) EstimateCount() int
- func (m *Mutator) Execute(ctx context.Context) <-chan string
- func (m *Mutator) ExecuteWithWriter(Writer io.Writer) error
- func (m *Mutator) PayloadCount() int
- func (m *Mutator) SaveRules(filename string) error
- func (m *Mutator) Time() string
- type Options
Constants ¶
const ( // General marker (open/close) General = "§" // ParenthesisOpen marker - begin of a placeholder ParenthesisOpen = "{{" // ParenthesisClose marker - end of a placeholder ParenthesisClose = "}}" )
Variables ¶
var (
DedupeResults = true // Dedupe all results (default: true)
)
var DefaultPermutationsBin []byte
Functions ¶
func ClusterBomb ¶
Nth Order ClusterBomb with variable length array/values
Types ¶
type Config ¶
type Config struct {
Patterns []string `yaml:"patterns"`
Payloads map[string][]string `yaml:"payloads"`
}
var DefaultConfig Config
DefaultConfig contains default patterns and payloads
type DedupingWriter ¶ added in v0.1.0
type DedupingWriter struct {
// contains filtered or unexported fields
}
DedupingWriter wraps an io.Writer with transparent deduplication using dedupe utils
func NewDedupingWriter ¶ added in v0.1.0
func NewDedupingWriter(w io.Writer, seed ...string) *DedupingWriter
NewDedupingWriter creates a new DedupingWriter with optional blacklist/seed The seed parameter allows pre-populating items to skip
func (*DedupingWriter) Close ¶ added in v0.1.0
func (dw *DedupingWriter) Close() error
Close flushes any remaining data and closes the writer
func (*DedupingWriter) Count ¶ added in v0.1.0
func (dw *DedupingWriter) Count() int
Count returns the number of unique items written
type IndexMap ¶
type IndexMap struct {
// contains filtered or unexported fields
}
func NewIndexMap ¶
NewIndexMap returns type such that elements of map can be retrieved by a fixed index
type Input ¶
type Input struct {
TLD string // only TLD (right most part of subdomain) ex: `.uk`
ETLD string // Simply put public suffix (ex: co.uk)
SLD string // Second-level domain (ex: scanme)
Root string // Root Domain (eTLD+1) of Subdomain
Sub string // Sub or LeftMost prefix of subdomain
Suffix string // suffix is everything except `Sub` (Note: if domain is not multilevel Suffix==Root)
MultiLevel []string // (Optional) store prefix of multi level subdomains
}
Input contains parsed/evaluated data of a URL
type Mutator ¶
type Mutator struct {
Options *Options
Inputs []*Input // all processed inputs
// contains filtered or unexported fields
}
Mutator
func (*Mutator) DryRun ¶
DryRun executes payloads without storing and returns number of payloads created this value is also stored in variable and can be accessed via getter `PayloadCount`
func (*Mutator) EstimateCount ¶
EstimateCount estimates number of payloads that will be created without actually executing/creating permutations
func (*Mutator) Execute ¶
Execute calculates all permutations using input wordlist and patterns and writes them to a string channel
func (*Mutator) ExecuteWithWriter ¶
ExecuteWithWriter executes Mutator and writes results directly to type that implements io.Writer interface
func (*Mutator) PayloadCount ¶
PayloadCount returns total estimated payloads count
type Options ¶
type Options struct {
// list of Domains to use as base
Domains []string
// list of words to use while creating permutations
// if empty DefaultWordList is used
Payloads map[string][]string
// list of pattersn to use while creating permutations
// if empty DefaultPatterns are used
Patterns []string
// Limits output results (0 = no limit)
Limit int
// Enrich when true alterx extra possible words from input
// and adds them to default payloads word,number
Enrich bool
// MaxSize limits output data size
MaxSize int
// Mode specifies the operation mode: "default" (default), "discover" (pattern mining only), "both" (combined)
// Empty string defaults to "default" mode for backwards compatibility
Mode string
// MinDistance is the minimum levenshtein distance for clustering
MinDistance int
// MaxDistance is the maximum levenshtein distance for clustering
MaxDistance int
// PatternThreshold is the threshold for pattern quality filtering
PatternThreshold int
// QualityRatio is the maximum ratio of synthetic/observed for pattern validation
QualityRatio float64
// NgramsLimit limits the number of n-grams to process (0 = no limit)
NgramsLimit int
// MaxLength is the maximum pattern length
MaxLength int
}
Mutator Options

