Keystroke logging, is the process of recording (logging) the keys pressed on a keyboard (usually when the user is unaware). It is also known as keylogging or keyboard capturing.
These programs are used for troubleshooting technical problems with computers and business networks. It can also be used to monitor network usages but more often then not it is used for malicious intents like stealing passwords.
This article illustrates designing keylogger for windows and linux.
Keylogger for Windows
Save the file in C:\ as Keylogger.py and run thepython file
The keylogger will be started in the background and save all the data on the log file “c:\output.txt”.
Keylogger in Linux
pyxhook requires python-xlib. Install it if you don’t have it already.
sudo apt-get install python-xlib
Download pyxhook library
The keylogger will be started in the background and save all the data on the file.log file “/home/akash/Desktop”.
This article is contributed by Akash Sharan. If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.