Skip to content

Commit

Permalink
Update args to full words
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarneo committed Mar 6, 2022
1 parent 17066f3 commit 50786fd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# RIP

This is a HTTP load testing tool that run requests concurrently. Written as a Golang learning project.
This is a HTTP load testing and UDP flood attack tool that run requests concurrently.

![RIP](./rip.png)

## Features

- HTTP load testing
- UDP flood attack
- Run requests concurrently
- Set a timer in second for how long it should run
- Outputs table of statistics for the end result
- Log the requests to $HOME/rip.log
- Supports multiple hosts
- UDP flood attack

## Coming

Expand All @@ -23,7 +24,7 @@ Install the binary from <https://github.com/bjarneo/rip/releases>, or go directl

```bash
# Standard by using one host
rip -c 100 -t 10 https://your.domain.com
rip -concurrent 100 -interval 10 https://your.domain.com

# Multiple hosts
touch hosts.txt
Expand All @@ -34,27 +35,27 @@ http://localhost:5000/dis-is-nice
http://localhost:5000/yas

# RIP
rip -t 10 -h hosts.txt
rip -interval 10 -hosts hosts.txt

# Using UDP flood attack
rip -t 10 -c 10 -u -ub 4096 0.0.0.0:30000
rip -interval 10 -concurrent 10 -udp -udp-bytes 4096 0.0.0.0:30000
```

### The default values

```
Usage of rip
-t int
How many seconds to run the test (default: 60)
-c float
-interval int
How many seconds to run the load tests (default: 60)
-concurrent float
How many concurrent users to simulate (default: 10)
-l bool
-logger bool
Log the requests to $HOME/rip.log (default: false)
-h string
-hosts string
A file of hosts. Each host should be on a new line. Will randomly choose an host.
-u bool
-udp bool
Run requests UDP flood attack and not http requests (default: false)
-ub int
-udp-bytes int
Set the x bytes for the UDP flood attack (default: 2048)
```
Expand Down
12 changes: 6 additions & 6 deletions utils/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ type Arguments struct {

func Args() Arguments {
flags := Arguments{
concurrent: flag.Int("c", 10, "How many concurrent users to simulate"),
interval: flag.Int("t", 60, "How many seconds to run the test"),
logger: flag.Bool("l", false, "Log the requests to $HOME/rip.log"),
hosts: flag.String("h", "", "A file of hosts. Each host should be on a new line. It will randomly choose a host."),
udp: flag.Bool("u", false, "Run requests UDP flood attack and not http requests"),
bytes: flag.Int("ub", 2048, "Set the x bytes for the UDP flood attack"),
concurrent: flag.Int("concurrent", 10, "How many concurrent users to simulate"),
interval: flag.Int("interval", 60, "How many seconds to run the test"),
logger: flag.Bool("logger", false, "Log the requests to $HOME/rip.log"),
hosts: flag.String("hosts", "", "A file of hosts. Each host should be on a new line. It will randomly choose a host."),
udp: flag.Bool("udp", false, "Run requests UDP flood attack and not http requests"),
bytes: flag.Int("udp-bytes", 2048, "Set the x bytes for the UDP flood attack"),
}

flag.Parse()
Expand Down

0 comments on commit 50786fd

Please sign in to comment.