This project gives full control over the device it runs on:
- Run any Shell/CMD/PowerShell command (
/api/system/run-command) - Shutdown / Restart / Sleep / Lock device
- Read/write/delete any file the user running Python can access (File Manager)
- Take screenshots
- Restart itself remotely (Watchdog on a separate port)
This means: anyone who reaches this server address on the network = has full control over your device. The project is built to be a "personal control center" on your home network (LAN) only, not a service exposed to the internet.
- Don't do Port Forwarding for port 5000 or 5001 on your router.
- If you need to access it from outside the home, use a VPN (like WireGuard or Tailscale) instead of opening the port to the whole world. Tailscale is particularly easy and will let you access the server as if it were on the same network, even from outside, without any router settings.
- Copy
.env.exampleto.envand setPOC_CONTROL_PINto a strong value (not "1234" or sequential numbers). - Every dangerous operation (delete file, run command, shutdown, etc.) requires this PIN as a header.
- The PIN is sent as plain text in every request — its purpose is to prevent anyone on the same network from accidentally pressing a button or guessing it, not to replace network security.
- The email password (IMAP) is stored as plain text in the local SQLite database (
data/poc.db). - Use a dedicated "App Password" (not your main password) — enable two-factor authentication and create an App Password from your account settings (Gmail/Outlook/etc.).
- The
data/poc.dbfile is already added to.gitignore, but be careful not to upload it by mistake.
- Open port 5000 (and 5001 if using Watchdog) only on "Private" networks, not Public.
- If you have multiple devices on the network that don't need to access it, restrict access by IP if possible.
- The server runs plain HTTP (no encryption) — suitable for a trusted home network, but if you're already using a VPN like Tailscale, it provides network-level encryption.
- If you want full HTTPS, you can put a reverse proxy (Caddy/nginx) in front of Flask with a self-signed certificate or use Tailscale/Cloudflare Tunnel.
| Feature | Risk | Mitigation |
|---|---|---|
run-command endpoint |
Execute any command on the device | Protected by PIN, requires trusted network only |
| File Manager | Read/delete/modify any file | Protected by PIN for dangerous operations, reading is not protected by PIN currently |
| Watchdog control (port 5001) | Remote force recovery | Protected by the same PIN, but it's a separate operation from any deeper auth |
| Email password storage | Plain text in SQLite | Use App Password, not production-grade secrets storage |
| No users/roles system | Anyone with the PIN = full control | Suitable for personal use, not for teams |
This project is personal/hobby, but if you find a vulnerability (like bypassing the PIN, path traversal in File Manager, etc.):
- Don't open a public issue on GitHub if the vulnerability is serious (like remote code execution without a PIN).
- Send the vulnerability details privately to the repo owner (via GitHub Security Advisories or email if available in the profile).
- A simple description of how to reproduce the issue is enough.
- Copied
.env.exampleto.envand changedPOC_CONTROL_PIN - Changed
POC_SECRET_KEYto a random long value - Server is running on a home network only (no Port Forwarding)
- If using Email notifications, using an App Password, not the primary password
- Opened the port in the firewall on "Private" only