Good morning dear readers of Tecnogalaxy, today we will talk about how to create a keylogger and how they work, but above all how to defend themselves.

The Keylogger is a very powerful hack or spying tool. If you are trying to spy on someone as a joke, you may fall back on this type of technique.


A keylogger, sometimes called keyboard capture, is a type of surveillance technology used to monitor and record each keystroke pressed on a computer. This type of software is also available for use on smartphones, such as iPhone and Android devices.

This tool is often used as a spyware tool by cybercriminals to steal personally identifiable information such as: login credentials and sensitive business data.

Some uses of keyloggers may be considered ethical or appropriate to varying degrees.


A hardware-based keylogger is a small device that acts as a connector between the keyboard and the computer. The device is designed to resemble a normal keyboard connector, part of the computer’s wiring, or a USB adapter, making it relatively easy to hide the device.

Instead, a keylogging software program does not require physical access to the user’s computer for installation. It can be downloaded on purpose by someone who wants to monitor activity on a particular computer, or it can be malware downloaded unknowingly and run as part of a rootkit or Trojan. The rootkit can boot and run secretly and evade manual detection or antivirus scans.


Due to the variety of keyloggers that use different techniques, no single method of detection or removal is considered the most effective since keyloggers can manipulate an operating system kernel.

Security software, like an anti-keylogger software program, is designed specifically to scan software-based keyloggers by comparing files on a computer with a checklist of common attributes. The use of an anti-keylogger can be more effective than an antivirus or antispyware program. Using a network monitor will grant the user a notification every time an application attempts to establish a network connection, giving the security team the opportunity to stop any possible keylogger activity.


1 step: Open the notepad on your computer and paste the following code into it:

2 step: Save the file as keylogger.pyw

3 step: Turn on your keylogger, double click on the file you just created and try it, then start typing.

When you want to stop recording, open Task Manager and close all “python” processes. Then look for keyloggeroutput.txt in the same directory where something.pyw. Open it and you should see everything you typed.

NOTE: You may see strange looking characters if you open it with the notepad, those characters mean you have pressed the backspace key, also I recommend that you have downloaded python on your device.

So this is a simple keylogger that saves keystrokes on the local machine. For more complex keyloggers the story gets more interesting but besides being longer in amount of lines of code is also more complicated.

Read also:

Was this article helpful to you? Help this site to keep the various expenses with a donation to your liking by clicking on this link. Thank you!

Follow us also on Telegram by clicking on this link to stay updated on the latest articles and news about the site.

If you want to ask questions or talk about technology you can join our Telegram group by clicking on this link.

© - It is forbidden to reproduce the content of this article.