Skip to content

A lightweight command-line tool for capturing keystrokes over a specified duration and saving them to a file. Features include easy-to-read output files and a user-friendly interface. Ideal for basic keystroke logging tasks with customizable duration.

License

Notifications You must be signed in to change notification settings

Anandkp21/PRODIGY_CS_TASK_04

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Keylogger Tool

A simple keylogger that logs keystrokes for a specified duration and saves them to a file.

Table of Contents

Overview

This keylogger tool captures keystrokes for a user-defined duration and saves the logged keys to a file named keylog.txt. It uses the pynput library to listen for keyboard events.

Features

  • Keylogging: Capture keystrokes and store them in a buffer.
  • Duration Control: Run the keylogger for a specified amount of time.
  • File Logging: Save the captured keystrokes to keylog.txt.
  • Real-time Feedback: Display remaining time in the console.

Installation

To set up this project, you need to have Python installed on your machine. Follow the steps below:

  1. Clone the repository:

    git clone https://github.com/Anandkp21/PRODIGY_CS_TASK_04.git
  2. Navigate to the project directory:

    cd keylogger-tool
  3. Install required dependencies:

    pip install pynput
  4. Run the keylogger:

    python keylog.py

Usage

  1. Run the keylogger script:

    python keylog.py
  2. Enter the duration:

    • You will be prompted to enter the duration for which you want the keylogger to run (in seconds).
  3. Keylogger in action:

    • The keylogger will start and capture all keystrokes for the specified duration.
    • The remaining time will be displayed in the console.
  4. Completion:

    • After the duration ends, the captured keystrokes will be saved to keylog.txt.

Example

Running the Keylogger

$ python keylog.py
Enter the duration for which you want to run the keylogger (in seconds):
10
Time duration to run: 10 seconds
Remaining time: 9 seconds
Remaining time: 8 seconds
...
Remaining time: 1 second
Keys logged to 'keylog.txt'

Checking the Logged Keys

$ cat keylog.txt
hello world

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A lightweight command-line tool for capturing keystrokes over a specified duration and saving them to a file. Features include easy-to-read output files and a user-friendly interface. Ideal for basic keystroke logging tasks with customizable duration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages