Skip to content

Latest commit

 

History

History
52 lines (39 loc) · 2.22 KB

File metadata and controls

52 lines (39 loc) · 2.22 KB

Modules

Engine Modules (C++)

main.cpp

Dual-mode entry point. Handles service initialization, scheduled task creation, and IPC command dispatch.

IPCServer.cpp

Named Pipe server. Accepts connections from the UI, parses commands, and dispatches to the appropriate handler.

KeyboardHook.cpp

Low-level keyboard hook (WH_KEYBOARD_LL). Intercepts key presses and enforces keyboard blocking. Includes bypass mechanism via hash verification.

WindowMonitor.cpp

Window monitoring via EnumWindows. Scans window titles against the keyword blocklist. Runs on a timer in the user's interactive session.

NetworkFilter.cpp

Hosts file manipulation for website blocking. Reads/writes C:\Windows\System32\drivers\etc\hosts. Flushes DNS cache via DnsFlushResolverCache (dynamically loaded from dnsapi.dll).

PunishmentManager.cpp

Manages all punishment executions:

  • Cut Internet — Disables network interfaces via netsh for 60 seconds
  • Screen Freeze — Creates a transparent overlay window
  • Keyboard Freeze — Blocks all keyboard input
  • Hardware Beep — Uses Beep() API
  • Flash — Semi-transparent overlay (WS_EX_LAYERED, alpha 25)
  • Drunk Mouse — Randomizes mouse movement
  • Auto Apology — Opens apology text in Notepad

CryptoUtils.h

SHA-256 hashing utilities for password verification and bypass hash generation.

UI Modules (C# WPF)

Elevation: Requires Administrator privileges (requireAdministrator manifest) for named pipe access to the engine.

MainWindow.xaml / .cs

Main application window with tabs:

  • Blocklist — Add/remove websites, applications, keywords
  • Settings — Toggle punishments, configure passwords
  • Pledge — Set/confirm compliance pledge
  • About — Version info and links

Services/

  • PipeClient.cs — Named Pipe client for engine communication (elevated context required)
  • UninstallService.cs — Uninstallation orchestration (stops engine, removes task, cleans files)
  • HostsManager.cs — Hosts file backup/restore
  • AutoStartService.cs — Scheduled task management

Dialogs/

  • UninstallDialog.xaml — Dark-themed progress dialog with Cancel/Minimize
  • AboutDialog.xaml — Version and credits info