1 | initial version |
To send multiple requests simultaneously using netcat, you can use concurrent connection tools like GNU Parallel or xargs.
For example, using GNU Parallel, you can use the following command:
echo -e "request1\nrequest2\nrequest3" | parallel -j3 'echo {} | nc <host> <port>'
This will send three requests simultaneously to the specified host and port.
Alternatively, you can use xargs to achieve the same result:
echo -e "request1\nrequest2\nrequest3" | xargs -P3 -I{} nc <host> <port> <<< {}
This will also send three requests simultaneously to the specified host and port.