Giter Site home page Giter Site logo

keylogger's Introduction

Terminal keylogger

This is a terminal application that provides a keylogging feature. It records the time spend, the keystrokes quantity and the typing speed. Additionally, you can look at your statistics for available dates by using extra flags.

  1. Setup
    1. Clone repository
    2. Create a virtual environment
  2. Functionality
    1. Start menu
    2. Recording
    3. Record statistics
    4. View statistics for another days
    5. Help message
  3. Bash script
  4. Configuring

Setup

An application requires python 3.10.4, can be a higher version.

1. Clone repository

$ git clone https://github.com/BorisPlaton/keylogger.git
$ cd keylogger

2. Create a virtual environment

$ sudo apt update && sudo apt install virtualenv
$ virtualenv --python=3.10.4 venv
$ ./venv/bin/activate
$ pip install -r requirements.txt

Functionality

1. Start menu

To run the program you have to write the following:

$ cd src
$ ./main.py

This will print:

Menu:
 `F1` Start recording
 `F2` Exit
  • F1 - Start recording process
  • F2 - Exit from the program

You can change these buttons in configuration.base_settings module.

2. Recording

If you press F1 you will start the recording process. Program will notify you by printing following message:

01:18, recording started:
 `F1` Stop

The message has time when you started recording and button to stop it.

3. Record statistics

If you press F1 program will view your summary keylogging statistic and for last session:

Summary statistics:
  - Time passed: 0:52:24
  - Keystrokes: 4239 times
  - Typing speed: ≈80.74 key/min
Last session:
  - Started at: 28 July, 00:36
  - Ended in: 28 July, 00:55
  - Time passed: 0:19:38
  - Keystrokes: 1189 times
  - Typing speed: ≈60.52 key/min

4. View statistics for another days

If you want to show statistics for a specific day, you can write the following command:

$ ./main.py -r
28 July, 2022:
- Time passed: 0:30:15
- Keystrokes: 2119 times
- Typing speed: 70.05 key/min

Without arguments, it shows current day statistics. Let's pass the date:

$ ./main.py -r 2022-07-27
27 July, 2022:
- Time passed: 0:34:33
- Keystrokes: 2145 times
- Typing speed: 62.08 key/min

You can change the input date format if you change the value of the INPUT_DATE key in the configuration.base_settings.DATA_FORMATS dict. If you want to see a list of statistics rather than a summary data, you can pass the -s or --separate flag.

$ ./main.py -r -s

1. 01 August, 2022:
- Time range: 00:39 - 00:39
- Time passed: 0:00:08
- Keystrokes: 0 times
- Typing speed: 0.0 key/min

2. 01 August, 2022:
- Time range: 00:42 - 00:42
- Time passed: 0:00:00
- Keystrokes: 0 times
- Typing speed: 0.0 key/min

3. 01 August, 2022:
- Time range: 01:29 - 01:29
- Time passed: 0:00:03
- Keystrokes: 0 times
- Typing speed: 0.0 key/min

4. 01 August, 2022:
- Time range: 01:36 - 01:36
- Time passed: 0:00:02
- Keystrokes: 6 times
- Typing speed: 123.13 key/min

With another date:

$ ./main.py -r 2022-07-27 -s

1. 27 July, 2022:
- Time range: 01:00 - 01:01
- Time passed: 0:00:06
- Keystrokes: 11 times
- Typing speed: 102.36 key/min

2. 27 July, 2022:
- Time range: 01:01 - 01:35
- Time passed: 0:34:26
- Keystrokes: 2134 times
- Typing speed: 61.95 key/min

5. Help message

Type -h or --help flag to view the help message:

$ ./main -h
$ ./main --help

Bash script

The project has a bash script - keylog, that allows you to run the program from anywhere in your filesystem. To add this script to your PATH write:

$ ls
keylog  README.md  requirements.txt  setup.cfg  src  venv
$ sudo ln -s $(pwd)/keylog /usr/local/bin/

Now you can write keylog and start the script:

$ cd /
$ keylog
Creating a virtual environment. Wait.

Menu:
 `F1` Start recording
 `F2` Exit

If you don't have a venv folder this script will create it. It will output the text above, so you can understand what is going on. If you do have a virtual environment it will run a program as a default.

Configuring

You can change appearance of messages in the configuration.base_settings module. Also, you can bind different buttons to start, stop and exit from the program.

keylogger's People

Contributors

borisplaton avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.