This is the C program (hare
) and the Python daemon (hared
) for this story.
hare is a small utility which is installed in a PAM configuration (e.g. for sshd
) in order to log when a successful login is attempted, e.g. to alert on machines which are seldom visited or otherwise monitored.
hare transmits a JSON string over a UDP datagram. The JSON looks like this:
{
"user": "jjolie",
"rhost": "that.host",
"service": "sshd",
"hostname": "tiggr.ww.mens.de",
"tst": 1522080746
}
The values for user
, rhost
, and service
are set by PAM from their PAM_
equivalents, and hostname
will contain the gethostname(3) result as determined by hare.
Python hared
is also installable via https://pypi.python.org/pypi/hared/