How mazenturk201/turk-ransomware works
Project type and purpose
• This is a small Python-based “ransomware” / screen-locker tool for Windows, intended for penetration-testing demos.
• It consists of two scripts:
• Turk Ransowm.py – the main locker application that grabs the screen, displays a full-screen GUI, intercepts keystrokes, and enforces the lock.
• Unlock.py – the solver that listens for the “Delete” key and terminates the lock.
• The requirements.txt (likely including tkinter) and README confirm a pure-Python desktop tool, no network or server components.
File structure
• Top level:
• README.md – project overview, usage instructions
• Turk Ransowm.py – entry point / locker logic
• Unlock.py – unlock logic
• requirements.txt – external Python dependencies (e.g., tkinter)
• No frontend/backend split, no database, no external services beyond the Python runtime and OS APIs.
• Key architectural choice: single-process Python app with two modules, one for locking, one for unlocking via key listener.
README for additional insights
• Confirms use of Python3 and Linux dependency note on python3-tk (GUI toolkit).
• Usage: run the main script, it locks the device, “Delete” key triggers Unlock.py.
• No mention of encryption or data exfiltration—primarily a demo screen lock.
a. Main components to show:
• Python Runtime Environment (Python3 interpreter)
• Operating System (Windows desktop environment, with OS APIs for windowing and input)
• GUI module (tkinter window that covers screen)
• Event Handler (keyboard listener for “Delete” key)
• Unlock module (Unlock.py logic to close the GUI and exit)
• (Optional) Requirements loader (pip installs dependencies)
b. Relationships & interactions:
1. User invokes “python3 Turk Ransowm.py” → Python Runtime loads main script.
2. Main script imports tkinter, spawns full-screen window.
3. Event Handler is registered on the window to capture all keystrokes.
4. On any key: if key is “Delete”, call Unlock.py (spawn second Python process or invoke its function)
5. Unlock.py signals the GUI to close / process to terminate, restoring user control.
c. Architectural patterns / principles:
• Single process with modularized sub-component for unlocking.
• Event-driven GUI pattern (register listeners, callback on key events).
• OS abstraction: uses Python standard library and tkinter for cross-platform GUI.
d. Key technologies & libraries:
• Python 3 interpreter
• tkinter (for GUI and input capture)
• Standard library modules (subprocess or os for invoking Unlock.py)