54 lines
2.0 KiB
Markdown
54 lines
2.0 KiB
Markdown
# Portnut
|
|
|
|
[](http://drone.sq.lan/Rust/Portnut)
|
|
|
|
# TODO
|
|
* Read the answer and count the number of answers received.
|
|
* Make a distributed version that allows stressing from multiple computers at the same time
|
|
|
|
# Install
|
|
Go to the releases page and download the latest version.
|
|
Give it execution rights and simply launch it.
|
|
|
|
# Usage
|
|
|
|
Portnut is a tcp port scanner / stresser.
|
|
|
|
The scanning function simply tries to connect to the tcp ports given.
|
|
The stressing function sends a payload every 10 milliseconds, to every ports given at the same time. The payload can be passed via a pipe (optionnal).
|
|
|
|
```
|
|
1637 justine@portnut > target/release/portnut -a 127.0.0.1 -w 3 -p 8080,22
|
|
Scanning 127.0.0.1
|
|
TCP/8080 => REJECT
|
|
TCP/22 => REJECT
|
|
|
|
#First scan the ports, and stress the available ones.
|
|
1738 justine@portnut > echo "GET / HTTP/1.1" | target/release/portnut -a 127.0.0.1 -p 8080 -w 30 -s -c 100
|
|
Scanning 127.0.0.1
|
|
TCP/8080 => ACCEPT
|
|
|
|
Stressing 127.0.0.1 using 100 concurrent threads per port for 30s
|
|
|
|
```
|
|
|
|
See the help :
|
|
```
|
|
justine@portnut > target/release/portnut -h
|
|
A simple TCP port scanner / stresser. If stressing, you can pass a payload via a pipe
|
|
|
|
Usage: portnut [OPTIONS] --address <ADDRESS>
|
|
|
|
Options:
|
|
-a, --address <ADDRESS> IP address or hostname to scan
|
|
-t, --timeout <TIMEOUT> Timeout for each connection in seconds [default: 1]
|
|
-w, --wait <WAIT> Number of milliseconds to wait in between scans when scanning OR duration of stress when stress testing (in seconds) [default: 30]
|
|
-p, --ports <PORTS>... Ports to stress / scan, separated by commas (22,80)
|
|
-r, --range Set this flag to treat the ports as a range rather than a list
|
|
-s, --stress Set this flag to stress the ports instead of scanning them
|
|
-c, --cthreads <CTHREADS> How many threads per port when stressing (Concurrent Threads) [default: 5]
|
|
-h, --help Print help
|
|
-V, --version Print version
|
|
|
|
```
|