0.1.5 • Public • Published


The backend consist of an expressjs webserver which serves the administrator interface using Basic HTTP Authentication customizable from the options and a server wait and handle the receiving of key logs from various sources, stores them and forward them to the administrator interface for be seen and analyzed.


The administrator interface for visualize the key logs archive and the live key logs feed from various clients is built with Angular using Angular CLI version 1.6.6. The administrator interface comes with a basic HTTP authorization which defaults to: keylog-io

Client script

The client script is a client with key logger functions that try to hide himself by pausing when the dev-tools (inspector) is open. It catches only relevant keys and send them back to the server as a buffer with additional information, take a look at the code if you want to see more.


The best way to use it is installing it globally so you have access at the keylog-io command anytime you want to spin up quickly your keylog server.

npm install -g


yarn global add

Than type -h or --help anytime to get informations about the program or the commands, for example:

$ keylog-io --help


  start [options]                    Start the keylogger server
  build [options] <hostname> [port]  Build the client flle for the given endpoint

or sub commands for example:

$ keylog-io start --help

Usage: start [options]


  -h, --hostname <host>  The address where start the server
  -p, --port <port>      The port where start the server (default: 9000)
  -c, --client           Serve the client keylogger file
  -d, --demo             Serve the demo client page
  -h, --help             output usage information

You can also optionally setup a database to use for storing persistently the keylog entries you grab with the client payload.

Basic usage

You can also use it in your applications or scripts like a normal nodejs module. First of all install it using npm or yarn:

npm install
yarn add

Than require it in your code and use it like in the example below, it takes only few options:

const keyloggerServer = require('');
// Start the server connected with database
  serveDemo: true,
  serveClient: true,
  database: {
    name: 'keylogger',
    username: 'user',
    password: 'pass'

By default the administrator interface will have Basic HTTP Authentication with values: keylog-io


For a full list of options see the default options on source code.


If you want to use the MySQL database to persist the keylog entries across time when used multiple times or for using the archive page to analyze your findings later using the filters, you must setup a table called keylogs, the suggested table structure is the following but you can adapt the sized to your needs or suggest a more optimized structure. You can customize the database name using the database options property which is an object that let you configure the details of the connection to your MySQL instance.

CREATE TABLE `keylogs` (
  `id` int(11NOT NULL,
  `hostname` varchar(50) NOT NULL,
  `element` varchar(50) NOT NULL,
  `key` varchar(50) NOT NULL,
  `path` varchar(255) NOT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp()
ALTER TABLE `keylogs`
  ADD KEY `HOSTNAME_INDEX` (`hostname`);
ALTER TABLE `keylogs`


  • Basic HTTP Authentication for administrator interface with options for username and password
  • Optionally save key logs results on a MySQL database
  • Change behavior, pausing and trying to hide when devtools is open
  • Create different routes for live feeds and archive
  • Handle mobile input events (mobile browsers support)
  • Test key logger performances with multiple different hosts
  • Complete the administrator interface with filters, groups, labels and stuff..
  • Write a good documentation with examples and video use during simulated MITM attacks
  • Write tests for backend and frontend code
  • Get drunk at the end of all this


Run npm run start this will concurrently spin up the express/socketio development server and start angular-cli. It should open a browser page with the administrator interface, if not, vavigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Also it will serve a keylogger client demo page at the address: http://localhost:9000/demo/

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.


Run npm run build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Run npm run build-client to build the key logger-client file which is a module with a payload for capturing key presses and send them to a remote server.

Running unit tests

Run npm run test to execute the unit tests via Karma.

Running end-to-end tests

Run npm run e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README. To get more informations about visit the official page or visit the documentation.


  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Write and run the tests (npm run test)
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request


The is released under the MIT License by b4dnewz.




Package Sidebar


npm i

Weekly Downloads






Unpacked Size

1.35 MB

Total Files


Last publish


  • b4dnewz