Tuesday 2 February 2016

PyKeylogger A Pure-Python Keylogger For Linux

PyKeylogger: A Pure-Python Keylogger For Linux

Definition: PyKeylogger is a pure-python keylogger for Linux that uses Xlib by which it can monitor the state of the keyboard. The main purpose is backup process and stealth keylogger too. It is available under the GNU General Public License. 


  1. It can easily log all keystrokes to disk
  2. It automatically archives log files according to its dated zips
  3. It also provides automatic log rotation
  4. Zipped log archives are sent out automatically to the specified email address[es] 
  5. It works with any SMTP server, including Gmail and Yahoo Mail secure SMTP servers
  6. Upload zipped log archives to a specified FTP server automatically
  7. At centered location of every mouse click, it takes a partial screenshot
  8. If the computer is running it takes screenshots at fixed time interval
  9. To ensure the minimization of data loss during crash, it automatically flush write buffer to disk 
  10. It provides the features of customization, through configuration with a .ini text file
  11. It also provides some features of GUI (graphical) control panel for settings and actions 
  12. It also provides features of password protection of control panel
  13. To prevent casual snooping passwords are obfuscated in the configuration file
  14. If the log files become older than specified age then it automatically deletes it.

Here is the example of its usage:

import keylogger
import time

now = time.time()
done = lambda: time.time() > now + 60
def print_keys(t, modifiers, keys): print "%.2f   %r   %r" % (t, keys, modifiers)

keylogger.log(done, print_keys)

This will print key events to stdout for 60 seconds. If you wanted to be evil, instead of passing in a print callback, you could pass in a remote logging procedure.

Sample output:

1314238675.42   'o'   {'left shift': False, 'right alt': False, 'right shift': False, 'left 

alt': False, 'left ctrl': False, 'right ctrl': False}
1314238675.51   'm'   {'left shift': False, 'right alt': False, 'right shift': False, 'left 

alt': False, 'left ctrl': False, 'right ctrl': False}
1314238675.65   'g'   {'left shift': False, 'right alt': False, 'right shift': False, 'left 

alt': False, 'left ctrl': Fals



Post a Comment

Note: only a member of this blog may post a comment.

Toggle Footer