Skip to content

padawanphysicist/keylogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keylogger

Very simple keylogger, written in Guile Scheme.

Dependencies

Build shared library

This keylogger relies on a shared library written in C; to compile it, use the command

make

Finding your keyboard device

With so many event files, how can one possibly know which one corresponds to which? You can find it with this command:

grep -iE -A4 'N: Name=' /proc/bus/input/devices | grep -i -A4 'keyboard' | grep -v "^[PSU]"

The output will be something like

N: Name="AT Translated Set 2 keyboard"
H: Handlers=sysrq kbd leds event4 

You should look at the field Handlers. In this case, the keyboard device will be /dev/input/event4.

Running the keylogger

With the keyboard device name, run the command

sudo LD_LIBRARY_PATH=./ GUILE_LOAD_PATH=./ guile -e main -s keylogger.scm -i /dev/input/event4 -o keylog.txt

and in the other terminal follow it with:

tail --follow keylog.txt