mynetcat is a simple netcat program which handles UDP packets.
This can be used as either a server or a client. To test it out, simply open two terminals (actually, you can use your own server/client and just use mynetcat separately). On one terminal, run the server version:
./mynetcat -l -u -p port [-C]
and on another, run the client:
./mynetcat -p port -u -h host [message(s) to send]
In the first form, mynetcat listens on the given port for UDP packets and writes them to standard out. With the C option they are written both in hexidecimal and (when possible) as ASCII, in a manned such as the hexdump -C command.
In the second form, takes data from stdin and on close of stdin sends the data as a UDP packet to the given port and host.
The host can be either a raw IP or a DNS name. The port number will be in decimal.
Set up the server:
./mynetcat -l -u -p 4444 -CSet up the client:
./mynetcat -p 4444 -u -h localhost hey there! This is an example message.And your output should echo what you wrote.