This project is undertaken solely for educational purposes, and there is no intention of engaging in any malicious activities. It is created with the sole purpose of learning and improving skills. Any use of the project for harmful or unethical actions is strictly discouraged.
The keylogger works as follows: If executed, it will run until the process is killed or interrupted. It works by logging all keystrokes and captures screenshots every minute by default. The script saves the screenshots and logs in the logs and imgs directories.
There are two types of logs:
- Raw: This type of log records all the keystrokes in the order the user inputs them.
- Processed: This type of log only records alphanumeric characters, with the goal of storing messages in a readable format.
If you want to try it you must create your .env file:
TOKEN=XXXXXXXXXXXXXXXX
CHAT_ID=XXXXX
When working with Telegram bots, two key components are essential for communication: the token
and the chat_id
.
The token
serves as a unique identifier for your Telegram bot. It is provided by the BotFather, Telegram's tool for creating and managing bots. This token is crucial for your Python script to authenticate and interact with the Telegram API, allowing your bot to send and receive messages. Ensure that you replace the placeholder token
in the script with the actual token assigned to your bot by the BotFather.
The chat_id
represents the unique identifier for a specific chat or conversation on Telegram.
To obtain the chat_id
for your Telegram bot, start a chat with the bot, send a message to trigger an update, and make a request to the Telegram Bot API using the URL https://api.telegram.org/bot{TOKEN}/getUpdates
, replacing {TOKEN}
with your actual bot token. Inspect the JSON response for the chat
object within the message
object, which contains the chat_id
. Use the obtained chat_id
in your Python script to ensure seamless communication with the Telegram API.