Skip to content

labcoder/mynetcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

mynetcat

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]

Usage:

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.


Example

Set up the server:
./mynetcat -l -u -p 4444 -C
Set up the client:
./mynetcat -p 4444 -u -h localhost hey there! This is an example message.
And your output should echo what you wrote.

About

A simple netcat program that handles UDP packets and can be used as either a server or client.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages