I want to send only one short value in a UDP packet, but running the command
echo -n \"hello\" | nc -4u localhost 8000
I can see that the serve
I did not find the -q1 option on my netcat. Instead I used the -w1 option. Below is the bash script I did to send an udp packet to any host and port:
-q1
-w1
#!/bin/bash def_host=localhost def_port=43211 HOST=${2:-$def_host} PORT=${3:-$def_port} echo -n "$1" | nc -4u -w1 $HOST $PORT