ddos

package module
v0.0.0-...-5cb2044 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2019 License: MIT Imports: 7 Imported by: 0

README

DDoS

Coverage Status Build Status Go Report Card GitHub license GoDoc

DDoS attack. Creating infinite http GET requests. If you need more information, then please see wiki.

Library created just for education task.

Minimal example of using:

func main() {
	workers := 100
	d, err := ddos.New("http://127.0.0.1:80", workers)
	if err != nil {
		panic(err)
	}
	d.Run()
	time.Sleep(time.Second)
	d.Stop()
	fmt.Println("DDoS attack server: http://127.0.0.1:80")
	// Output: DDoS attack server: http://127.0.0.1:80
}

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DDoS

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

DDoS - structure of value for DDoS attack

func New

func New(URL string, workers int) (*DDoS, error)

New - initialization of new DDoS attack

Example
package main

import (
	"fmt"
	"os"
	"time"

	ddos "github.com/Konstantin8105/DDoS"
)

func main() {
	workers := 1000
	d, err := ddos.New("http://127.0.0.1:80", workers)
	if err != nil {
		panic(err)
	}
	d.Run()
	time.Sleep(time.Second)
	d.Stop()
	fmt.Fprintf(os.Stdout, "DDoS attack server: http://127.0.0.1:80\n")
}
Output:

DDoS attack server: http://127.0.0.1:80

func (DDoS) Result

func (d DDoS) Result() (successRequest, amountRequests int64)

Result - result of DDoS attack

func (*DDoS) Run

func (d *DDoS) Run()

Run - run DDoS attack

func (*DDoS) Stop

func (d *DDoS) Stop()

Stop - stop DDoS attack

Jump to

Keyboard shortcuts

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