http

package
v0.0.0-...-c4c5c6d Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttackConfig

type AttackConfig struct {
	base.StatefulAttackerConfig
	HTTPClient string
	URL        string
	TLSConfig  *tls.Config

	// AttackType the type of attack you wish to execute
	AttackType AttackType

	// Send the Flood using the QUIC protocol
	Quic bool
	// contains filtered or unexported fields
}

AttackConfig enables one to configure an attack

func (*AttackConfig) Validate

func (a *AttackConfig) Validate() (err error)

Validate allows us to validate the flags we got in

type AttackType

type AttackType int

AttackType is our enum for attacks

const (
	// GetFlood floods the server with GET requests
	GetFlood AttackType = iota
	// PostFlood Floods the server with POST requests
	PostFlood
	// Slowloris opens up connections and trickles bytes in
	Slowloris
)

type Attacker

type Attacker struct {
	Config *AttackConfig
	Target *base.Target
	Log    *zap.SugaredLogger

	GetAttacker GetFloodAttack
}

Attacker holds the information on our HTTPS attack

func (*Attacker) Attack

func (a *Attacker) Attack(v ...base.Validator) error

Attack validates the attacker interface. The validator will mangle the values, making it easier to use them.

func (Attacker) GetFlood

func (a Attacker) GetFlood(c chan error)

GetFlood executes a Get request flood

type FastHTTPGet

type FastHTTPGet struct {
	// contains filtered or unexported fields
}

FastHTTPGet implements our GetFloodAttack

func (*FastHTTPGet) Get

func (f *FastHTTPGet) Get() error

Get does what it says it will

func (*FastHTTPGet) SetAttacker

func (f *FastHTTPGet) SetAttacker(a *Attacker)

SetAttacker sets the attacker and instantiates the client

type GetFloodAttack

type GetFloodAttack interface {
	SetAttacker(*Attacker)
	Get() error
}

GetFloodAttack is our generic interface that allows us to execute a get flood

type RegHTTPGet

type RegHTTPGet struct {
	// contains filtered or unexported fields
}

RegHTTPGet implements our GET flood using the regular net/http

func (*RegHTTPGet) Get

func (r *RegHTTPGet) Get() error

Get ...

func (*RegHTTPGet) SetAttacker

func (r *RegHTTPGet) SetAttacker(a *Attacker)

SetAttacker ....

Jump to

Keyboard shortcuts

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