This project is a Windows-based keylogger and clipboard monitoring tool built in Go. It captures keyboard events and monitors the clipboard for changes, saving both logs to separate files. This tool demonstrates low-level interaction with Windows APIs to intercept keyboard events and read the clipboard's content.
- Keylogging: Captures and logs keystrokes to a file (
keystrokes.txt). - Clipboard Monitoring: Monitors changes to the clipboard content and logs each new entry to a file (
clipboard.txt). - Keyboard Layout Detection: Detects and applies specific keyboard mappings (e.g., Spanish, English, etc.).
- Go: Ensure Go is installed. You can download it here.
- Windows OS: This project is designed for Windows only, due to the specific use of Windows APIs.
- Clone the Repository
git clone https://github.com/0xCyberBerserker/keyloggy.git cd keylogger
- Install Dependencies: No external Go packages are required. However, ensure Go can locate user32.dll and kernel32.dll as they are used to access Windows system APIs.
Run the following command in the project directory inside PowerShell:
.\compile.ps1keystrokes.txt: This file logs all captured keystrokes, including special characters and key combinations.clipboard.txt: This file logs all unique clipboard entries detected while the program is running.
main.go: Main program file containing:monitorClipboard(): Monitors the clipboard for changes every 2 seconds.LowLevelKeyboardProc(): Handles keyboard events, capturing keystrokes.readClipboard(): Reads the current content of the clipboard.
- Permission Issues: Some Windows versions may restrict clipboard and keyboard hook access. Run the program with Administrator privileges if you encounter errors.
- Clipboard Check Interval: The clipboard is checked every 2 seconds. You can modify this interval in the
monitorClipboardfunction.
This project is licensed under the MIT License.
Feel free to explore and modify the code for educational purposes. Note: Always ensure ethical and legal compliance when using keylogging tools.