Keystroke logging, often referred to as keylogging or keyboard capturing, is the action of recording (logging) the keys struck on a keyboard, typically covertly, so that the person using the keyboard is unaware that their actions are being monitored.
These are computer programs designed to work on the target computer’s software. Keyloggers are used in IT organizations to troubleshoot technical problems with computers and business networks. Families and business people use keyloggers legally to monitor network usage without their users’ direct knowledge. However, malicious individuals can use keyloggers on public computers to steal passwords or credit card information.
This article illustrates designing keylogger for windows and linux.
Keylogger for Windows
Following is the code to create keylogger in python
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 contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.
- Layouts in Android UI Design
- 6 Best CSS frameworks You should Know to design Attractive Websites
- OOPs | Object Oriented Design
- UI vs UX Design : Which Career Option Should You Choose?
- Design Issues of Distributed System
- Design an online book reader system
- Characteristics of Good Object Oriented Design
- Design data structures for a very large social network like Facebook or Linkedln
- Reading Python File-Like Objects from C | Python
- Important differences between Python 2.x and Python 3.x with examples
- Python | Add Logging to a Python Script
- Python | Set 4 (Dictionary, Keywords in Python)
- Python | Add Logging to Python Libraries
- Python | Sort Python Dictionaries by Key or Value