Skip to content

UDP listener and server written in C that does not hang after sending a message like netcat does

Notifications You must be signed in to change notification settings

shekkbuilder/statussocket

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conatins a bit of C to listen on a UDP socket and write to that socket.

This does the same as nc -u -l localhost 9999 and echo helo | nc -u -w1 -q1 localhost 9999

but without the gip.

The server side can run predefined commands.

/etc/ops.allow defines the commands that are available

#
# Commands to run as root
#

echo     echo hello world
reboot   init 6

/var/ops/command should have a list of command permitted on this host.

echo
reboot

Security implications of this should be obvious.

It is not possible to run arbitrary commands (that would be silly) or to pass arguments.

If you want a more elaborate solution for this problem with security concerns addressed and a mechanism to pass arguments look at nagios.

About

UDP listener and server written in C that does not hang after sending a message like netcat does

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.7%
  • Makefile 5.3%