[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: testing a udp socket with netcat



On 14/03/12 13:27, Arif Hossain wrote:
i've this udp daemon which is waiting for an incoming udp datagram. now
i want test this daemon for random garbage to test how it behaves. My
udp daemon is running because its shows on netstat. problem is if i
issue following command for putting udp datagram :
$nc -uvvz<host>  <port>

       -z           zero-I/O mode [used for scanning]


it does not output any thing. i have straced the udp daemon. which does
not returns from recv() call.

my goal is to put arbitrary data on the udp socket by netcat. i do not
have any experience regarding netcat so i'm asking if anyone can help me
out with this.

I *think* you are connecting to the UDP port but not sending anything,
which is why the daemon isn't responding.

What if you omit -z?  What if (in both cases) you hammer some keys on
the netcat prompt and hit enter? (or try piping e.g dmesg into the nc
process: dmesg | nc -uvv <host> <port>


Reply to: