Documentation ¶
Index ¶
- func BuildPayloadFromOptions(options *types.Options) map[string]interface{}
- func EnvVars() map[string]interface{}
- func ExpandMapValues(m map[string]string) map[string][]string
- func MergeMaps(maps ...map[string]interface{}) map[string]interface{}
- func MergeMapsMany(maps ...interface{}) map[string][]string
- func SliceToMap(s []string, sep string) map[string]interface{}
- type AttackType
- type AttackTypeHolder
- func (holder AttackTypeHolder) JSONSchemaType() *jsonschema.Type
- func (holder *AttackTypeHolder) MarshalJSON() ([]byte, error)
- func (holder AttackTypeHolder) MarshalYAML() (interface{}, error)
- func (holder *AttackTypeHolder) UnmarshalJSON(data []byte) error
- func (holder *AttackTypeHolder) UnmarshalYAML(unmarshal func(interface{}) error) error
- type Iterator
- type PayloadGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPayloadFromOptions ¶
BuildPayloadFromOptions returns a map with the payloads provided via CLI
func EnvVars ¶
func EnvVars() map[string]interface{}
EnvVars returns a map with all environment variables into a map
func ExpandMapValues ¶
ExpandMapValues converts values from flat string to string slice
func MergeMapsMany ¶
MergeMapsMany merges many maps into a new map
func SliceToMap ¶
SliceToMap converts a slice of strings to map of string splitting each item at sep as "key sep value"
Types ¶
type AttackType ¶
type AttackType int
AttackType is the type of attack for payloads
const ( // name:batteringram BatteringRamAttack AttackType = iota + 1 // name:pitchfork PitchForkAttack // name:clusterbomb ClusterBombAttack )
Supported values for the AttackType name:AttackType
func GetSupportedAttackTypes ¶
func GetSupportedAttackTypes() []AttackType
func (AttackType) String ¶
func (t AttackType) String() string
type AttackTypeHolder ¶
type AttackTypeHolder struct {
Value AttackType `mapping:"true"`
}
AttackTypeHolder is used to hold internal type of the protocol
func (AttackTypeHolder) JSONSchemaType ¶
func (holder AttackTypeHolder) JSONSchemaType() *jsonschema.Type
func (*AttackTypeHolder) MarshalJSON ¶
func (holder *AttackTypeHolder) MarshalJSON() ([]byte, error)
func (AttackTypeHolder) MarshalYAML ¶
func (holder AttackTypeHolder) MarshalYAML() (interface{}, error)
func (*AttackTypeHolder) UnmarshalJSON ¶
func (holder *AttackTypeHolder) UnmarshalJSON(data []byte) error
func (*AttackTypeHolder) UnmarshalYAML ¶
func (holder *AttackTypeHolder) UnmarshalYAML(unmarshal func(interface{}) error) error
type Iterator ¶
type Iterator struct { Type AttackType // contains filtered or unexported fields }
Iterator is a single instance of an iterator for a generator structure
func (*Iterator) Reset ¶
func (i *Iterator) Reset()
Reset resets the iterator back to its initial value
type PayloadGenerator ¶
type PayloadGenerator struct { Type AttackType // contains filtered or unexported fields }
PayloadGenerator is the generator struct for generating payloads
func New ¶
func New(payloads map[string]interface{}, attackType AttackType, templatePath string, catalog catalog.Catalog, customAttackType string, opts *types.Options) (*PayloadGenerator, error)
New creates a new generator structure for payload generation
func (*PayloadGenerator) NewIterator ¶
func (g *PayloadGenerator) NewIterator() *Iterator
NewIterator creates a new iterator for the payloads generator