Ask Your Question
0

What changes do I need to make in the netcat command line to send multiple requests simultaneously?

asked 2023-03-26 11:00:00 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-08-31 12:00:00 +0000

bukephalos gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-03-26 11:00:00 +0000

Seen: 9 times

Last updated: Aug 31 '22