File tree Expand file tree Collapse file tree 1 file changed +94
-0
lines changed
Expand file tree Collapse file tree 1 file changed +94
-0
lines changed Original file line number Diff line number Diff line change 1+ # 🛡️ Simple Python Keylogger
2+
3+ A minimal keylogger written in Python that captures all keystrokes and stores them in a log file.
4+
5+ ---
6+
7+ ## ⚠️ Legal Disclaimer
8+
9+ This script is ** strictly for educational purposes** .
10+ Using a keylogger on systems you do not own or have explicit permission to monitor is ** illegal and unethical** .
11+
12+ ---
13+
14+ ## 📌 How It Works (with Example)
15+
16+ 1 . You run the script:
17+ ``` bash
18+ python keylogger.py
19+ ```
20+
21+ 2 . It starts listening to ** all keyboard inputs** .
22+
23+ 3 . While you're typing in any app — browser, notepad, terminal — the script logs each key press.
24+
25+ 4 . Suppose you typed this in any window:
26+
27+ ```
28+ hello world123
29+ ```
30+
31+ Then pressed:
32+ - ` Enter `
33+ - ` Backspace `
34+ - ` Shift + A `
35+
36+ 5 . The ` keylog.txt ` file will contain something like:
37+
38+ ```
39+ hello[Key.space]world123[Key.enter][Key.backspace]A
40+ ```
41+
42+ 6 . Press ` ESC ` to stop the keylogger.
43+
44+ ---
45+
46+ ## 🛠️ Installation
47+
48+ ### 1. Install the required module:
49+
50+ ``` bash
51+ pip install pynput
52+ ```
53+
54+ ### 2. Run the script:
55+
56+ ``` bash
57+ python keylogger.py
58+ ```
59+
60+ ---
61+
62+ ## 📝 Log Output
63+
64+ All captured keystrokes are saved in:
65+ ```
66+ keylog.txt
67+ ```
68+
69+ Located in the same folder as the script.
70+
71+ ---
72+
73+ ## 💡 Tips for Learning
74+
75+ - Try typing different key combinations to see how they’re logged.
76+ - Observe how special keys (e.g., ` Enter ` , ` Shift ` , ` Backspace ` ) appear.
77+ - Extend the project to include:
78+ - Timestamp for each keystroke
79+ - Email log every X minutes (for ethical monitoring use only)
80+ - Stealth mode (advanced)
81+
82+ ---
83+
84+ ## 🧱 Folder Structure
85+
86+ ```
87+ Keylogger/
88+ ├── keylogger.py # Main script
89+ └── keylog.txt # Captured keystrokes
90+ ```
91+
92+ ---
93+
94+ # Build by AAKASH
You can’t perform that action at this time.
0 commit comments