Skip to content

Commit

Permalink
Allow zero values
Browse files Browse the repository at this point in the history
  • Loading branch information
nakabonne committed Sep 16, 2020
1 parent c741921 commit b6045f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
18 changes: 12 additions & 6 deletions README.md
Expand Up @@ -21,11 +21,17 @@ Give the target URL and press Enter, then the attack will be launched with defau

### Options

**Rate Limit**
#### Rate Limit

**Duration**
The request rate per time unit to issue against the targets.
Give 0 then it will send requests as fast as possible.

**Timeout**
#### Duration
The amount of time to issue requests to the targets. Give `0s` for an infinite attack. Press `Ctrl-C` to stop.
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". Default is `10s`.

#### Timeout
The timeout for each request. `0s` means to disable timeouts.

**Method**

Expand All @@ -35,17 +41,17 @@ Give the target URL and press Enter, then the attack will be launched with defau

## Features

#### Plot in real-time
### Plot in real-time
Currently it only plots latencies, but in the near future more metrics will be drawn as well.

![Screenshot](images/real-time.gif)

#### Visualize the attack progress
### Visualize the attack progress
This will help you during long tests.

![Screenshot](images/progress.gif)

#### Mouse support
### Mouse support
With the help of [mum4k/termdash](https://github.com/mum4k/termdash), intuitive operation is supported.

![Screenshot](images/mouse-support.gif)
Expand Down
9 changes: 0 additions & 9 deletions attacker/attacker.go
Expand Up @@ -46,15 +46,6 @@ func Attack(ctx context.Context, target string, resCh chan *Result, opts Options
if target == "" {
return nil
}
if opts.Rate == 0 {
opts.Rate = DefaultRate
}
if opts.Duration == 0 {
opts.Duration = DefaultDuration
}
if opts.Timeout == 0 {
opts.Timeout = DefaultTimeout
}
if opts.Method == "" {
opts.Method = DefaultMethod
}
Expand Down
2 changes: 1 addition & 1 deletion gui/widgets.go
Expand Up @@ -42,7 +42,7 @@ func newWidgets() (*widgets, error) {
if err != nil {
return nil, err
}
navi, err := newText("Ctrl-c: quit, Enter: attack")
navi, err := newText("Ctrl-C: quit, Enter: attack")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit b6045f5

Please sign in to comment.