Added a cthreads argument

This commit is contained in:
Justine Pelletreau
2023-07-13 19:38:04 +02:00
parent 2cad1b4ef3
commit 06821e3087
2 changed files with 47 additions and 35 deletions

View File

@ -1,7 +1,8 @@
# Portnut
TODO
* Allow multiple threads hitting on the same port
* Read the answer and count the number of answers received.
* Make a distributed version that allows stressing from multiple computers at the same time
Portnut is a tcp port scanner / stresser.
@ -15,13 +16,11 @@ TCP/8080 => REJECT
TCP/22 => REJECT
#First scan the ports, and stress the available ones.
justine@portnut > echo "My payload" | target/release/portnut -a 127.0.0.1 -p 22,8080 -w 3 -s
Scanning 127.0.0.1
TCP/22 => REJECT
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...
Stressing 127.0.0.1 using 100 concurrent threads per port for 30s
```
@ -33,11 +32,13 @@ A simple TCP port scanner / stresser. If stressing, you can pass a payload via a
Usage: portnut [OPTIONS] --address <ADDRESS>
Options:
-a, --address <ADDRESS> IP address 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)
-s, --stress Set this flag to stress the ports instead of scanning them
-h, --help Print help
-V, --version Print version
-a, --address <ADDRESS> IP address 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)
-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
```