turtle

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 10 Imported by: 1

README

turtle

Disclaimer

Usage of this program for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws in all countries. Developers assume no liability and are not responsible for any misuse or damage caused by this program.

LICENSE

MIT

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SlowBodyReadRequest

type SlowBodyReadRequest struct {
	Target Target `embed:""`

	// Method - the HTTP method to use, one of POST / PUT. Defaults to POST.
	Method string `name:"http-method" help:"the HTTP method to use, one of POST / PUT. Defaults to POST."`

	// BodyReadTimeout - the timeout for reading the request body. Defaults to hang forever.
	BodyReadTimeout time.Duration `name:"http-read-timeout" help:"the timeout for reading the request body. Defaults to hang forever."`
	// contains filtered or unexported fields
}

SlowBodyReadRequest provides the configurations for simulating slow request body reading attack.

Example
u, err := url.Parse("http://127.0.0.1:8080")
if err != nil {
	panic(err)
}

s := SlowBodyReadRequest{
	Target: Target{
		Url: *u,
	},
	Method:          http.MethodPost,
	BodyReadTimeout: 180 * time.Second,
}

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

_ = s.Run(ctx)

func (*SlowBodyReadRequest) Run

type Slowloris

type Slowloris struct {
	Target Target `embed:""`

	// Method - the HTTP method to use. Defaults to GET
	Method string `name:"http-method" help:"the HTTP method to use. Defaults to GET"`

	// UserAgents - list of user agents to use.
	// If more than one is provided, a random one will be selected.
	// If none is provided, a default one will be used.
	UserAgents []string `` /* 167-byte string literal not displayed */

	// SendGibberish - whether to send gibberish data in the request header.
	SendGibberish bool `name:"http-send-gibberish" help:"whether to send gibberish data in the request header"`

	// GibberishInterval - the random interval to send gibberish data in the request header. Defaults to 3s.
	GibberishInterval time.Duration `name:"http-gibberish-interval" help:"the random interval to send gibberish data in the request header"`

	// WriteTimeout - the timeout for writing the request header. Defaults to 10s.
	WriteTimeout time.Duration `name:"http-write-timeout" help:"the timeout for writing the request header. Defaults to 10s."`
	// contains filtered or unexported fields
}

Slowloris provides the configurations for running slowloris attack.

Example
u, err := url.Parse("http://127.0.0.1:8080")
if err != nil {
	panic(err)
}

s := Slowloris{
	Target: Target{
		Url: *u,
	},
	SendGibberish:     true,
	GibberishInterval: 5 * time.Millisecond,
	UserAgents: []string{
		"turtle/0.0.1",
		"turtle/0.0.1 - slowloris",
	},
}

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

_ = s.Run(ctx)

func (*Slowloris) Run

func (s *Slowloris) Run(ctx context.Context) error

type Target

type Target struct {
	// Url - the url of the target.
	Url url.URL `arg:"" name:"target-url" help:"the url of the target"`
	// Duration - the duration of the attack. Defaults to 30s.
	Duration time.Duration `name:"target-duration" help:"the duration of the attack. Defaults to 30s"`
	// Connections - the number of connections to be made. Defaults to 100.
	Connections int `name:"target-connections" help:"the number of connections to be made. Defaults to 100"`
}

Target provides target configuration.

Directories

Path Synopsis
cmd module
internal

Jump to

Keyboard shortcuts

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