Package: kaoz
General purposeKaoz is a free notifier for IRC. It’s purpose is to provide an easy to use way for System Administrators to send warnings and logs on any choosen IRC channel.
It therefore uses a persistent daemon, which is called theserverlater on, that will listen on a given port, optionnaly with ssl enabled.
The server expects lines to have the formatpassword:channel:message, likesecret:#help:Hello.passwordis a global password required to use the service.channelis an irc channel on the configured network. (Kaoz will join the channel to do so).
Aclientis an application which connects to the server to send messages on IRC.
Please note that, in case you whish to agregate many servers’ notifications, you may have only one Kaoz server, but you should multiply clients.LicenceKaoz is provided under a MIT-like licence. See the licence file for more informations.Dependenciespythonpython ssl module (if you whish to use SSL)python irc library (https://bitbucket.org/jaraco/irc)Installation of the serverFirst, copy the config to the location of your choice, for example/etc/kaoz.conf.
Then edit thekaoz.conffile to provide correct values for the IRC Server and the listening socket.
The daemon is started with thebin/kaozprogram.
There is a Gentooinit.dfile ininitd/kaozfor your interest.
It should be easy to figure out how to adapt this file to your distribution.Known limitationsKaoz does not support key-protected channels.Kaoz client examplesSending messages to IRCHere are some ways to sendHelloto channel#helpusing a Kaoz server which is listenning on hostmyhostport4242, protected with passwordsecret.
For that purpose, a client needs to sendsecret:#help:Helloto the server (with an optional LF or CR+LF, as you want).In Shell, for simple servers without SSL, use one of the following lines:echo"secret:#help:Hello"|netcatmyhost4242echo"secret:#help:Hello"|socat-TCP:myhost:4242In Shell, for servers which use SSL certificates:echo"secret:#help:Hello"|socat-OPENSSL:myhost:4242In Shell, for servers which use SSL certificates and a trusted authority certificate file (CA file):echo"secret:#help:Hello"|socat-OPENSSL:myhost:4242,verify,cafile=myca.crtIn Python without SSL:importsocketsock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)sock.connect(('myhost',4242))sock.sendall('%s:%s:%s'%('secret','#help','Hello'))sock.close()In Python with SSL:importsocketimportsslsock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)sock.connect(('myhost',4242))# use these options to check CA: cert_reqs=ssl.CERT_REQUIRED, certfile='myca.crt'sock=ssl.wrap_socket(self.sock)sock.sendall('%s:%s:%s'%('secret','#help','Hello'))sock.close()Kaoz server support multi-lined messages, so long as each lines begins with the password and a channel.Sending commands to KoazA Kaoz server also accepts basic commands which enable its monitoring.
When a client wants to runcommandon the server, she needs to sendsecret::commandand the server replies directly in the socket.
The double colon that it is a command, rather than a message to send to IRC.The following commands are supported (there is only one for the time being):channels: get the list of channels the server has joined.About IRC style and colorsSome control sequences allow IRC users to write messages with style and colors (^XmeansCtrl+X):^B(= x02) Bold text^C(= x03) Colored text^O(= x0F) Back to original plain text^R(= x16) Reversed text^_(= x1F) Underlined textThere are 16 colors:BlackNavy BlueGreenRedBrownPurpleOliveYellowLime GreenTealAqua LightRoyal BlueHot PinkDark GrayLight GrayWhiteFor example^C2Hellowrites Hello in blue.ContactKaoz is provided byBinet Réseau, a student association from France’s École polytechnique.
If you have inquiries, comments or suggestions, you may contact us atbr@eleves.polytechnique.fr________________
     _/ ______________ \_
   _/ _/              \_ \
  / _/   ____    ____   \ \
 / /    / __ \  / __ \   | |
/ /    / /_/ / / /_/ /   | |
| |   / _, <  / _, _/    | |
| |  / /_/ / / / | |     | |
| | /_____/ /_/  | |    / /
 \ \              \ \__/ /
  \ \_             \____/
   \_ \________________
     \________________/