I’m currently writing a GNU/linux IRC bot to help me evaluate the kind of malware that runs on modern GNU/Linux systems. Part of this IRC bot is designed to allow the operator to request key strokes to be logged on the client.
So I have a couple questions for you guys regarding the linux/input header file.
Firstly, I couldn’t figure out whether or not it is part of x11 or not, if someone could clarify that it would be great. Lastly, is the only way to capture keyboard input through capturing the device events from the “drivers?” in /dev/input/?
Thank you in advance.
No linux/input.h is not part of X11, it’s part of linux. (All X11 headers are under X11/)
There’s always more than one way to do things, but reading from /dev/input is probably going to be the easiest / most reliable. See http://www.thelinuxdaily.com/2010/05/grab-raw-keyboard-input-from-event-device-node-devinputevent/
Note: you will need root to read from the keyboard like this.