
KMLog is an interactive cli application for interfacing with tools which collect typing dynamics
I am very much aware that KMLogger can be used for nefarious purposes. This project is used solely for controlled data collection purposes. Do not use this for illegal purposes, period. Please read the LICENSE for licensing information
Rationale
Code Breakdown
MySQL Installation
MySQL Setup
User Information Storage in YAML
Usage
Using the Headless Keylogger
Testing the HTML Pages
License
Contributing
Media
Credits
Participate
The goal of this project is to create a sleek and lightweight interface to collect specific typing dynamics data from real people
This folder holds python files for the project’s core functionality:
This folder holds the keylogger and mouse tracker to collect typing dynamics data.
This folder holds the log and csv files generated by the keylogger and the mouse tracker
The use of the .env file was a strategic decision to allow for future users of this code base to be able to adapt it to their needs with as little code modifications as possible. The use of the .env file also improves the secrecy and security associated with connecting to the mysql database as none of the connection information is written into the code, but rather read in from created environment variables. The .env file contains the following variables:
See sample.env for an example .env configuration
NOTE: If you decide to change the names of the environment variables make sure that they do not conflict with an Operating System specific predefined variables. For example USER in MacOS and USERNAME in Windows -
For macs install homebrew and run:
brew install mysql
The MySQL documentation recommends using the MySQL Installer for Windows
To ensure that mysql is installed correctly run:
mysql --version
The MySQL installer should take care of everything To start the mysql interactive cli run:
mysql -u [YOUR_USERNAME] -p
Start MySQL server by running:
brew services start mysql
Secure installation of MySQL Server:
mysql_secure_installation
Like for Windows, to start the MySQL cli run:
mysql -u [YOUR_USERNAME] -p
The YAML backed system is a simpler local storage alternative to the MySQL database The YAML system uses the users inputted user-id to search through the “users” folder to see if a YAML file already exists with a matching file name. If it does we know the user already exists in the “database” and we can just pull their information from the file. If the file does not exist, we can create one and add it to the “database” The YAML file stores data in the following format:
user_id: Integer
first_name: String
last_name: String
age: Integer
gender: String
handedness: String
education: String
platform: String
See 123.yaml for more details
git clone https://github.com/AlvinKuruvilla/kmlog.git
pip3 -r requirements.txt
python3 kmlog.py
git clone https://github.com/AlvinKuruvilla/kmlog.git
pip3 -r requirements.txt
./build.sh
This puts the executable in the dist/ folder
./kmlog
To fix any problems with input recording, give your terminal or the executable Input Monitoring access
On Apple devices, navigate to System Preferences > Go to Privacy and Security > Go to the Input Monitoring tab > Select your terminal application or kmlog executable (if they are not already there) and then toggle one of them on.
Download the binary from the release page.
Change the permissions of the binary file so it is executable
chmod 777 kmlog
If your shell kills the executable when trying to run it, this is because Apple does not allow programs to run which are from unidentifiable developers. To fix this, navigate to System Preferences > Go to Privacy and Security > Go to the General tab > Click Run Anyway
See Contributing
The logo was designed from Hatchful by Shopify
⚠️ NOTE: To avoid any potential issues with browser caching and cookie retention, it is recommended to use a fresh private browser instance
Click here to participate in data collection