Repository navigation
Security hardening and documentation release for the LanPower Linux & Windows agents.
What's Changed
- Browser CSRF Protection (
HTTP 403): Both Linux and Windows agents now rejectPOSTrequests containing a browserOriginheader (browser_requests_not_allowed), blocking malicious websites from triggering local power actions even when no PIN is configured. - Windows Install Directory Hardening: Verifies
C:\ProgramData\LanPoweris not a symlink/junction and is owned exclusively bySYSTEMorAdministratorsbefore installing, changing PIN, or uninstalling. - PIN Validation: Enforces 4–64 printable ASCII characters without spaces (preventing broken non-ASCII/whitespace PINs) and warns if shorter than 6 characters.
- Private-LAN-Only Firewall Rules (Linux): Automatically opens UFW /
firewalldrules strictly for private LAN subnets (RFC1918,100.64.0.0/10, link-local) and skips public subnets. - Python 3.7+ Check: Verifies Python 3.7+ early before writing config or systemd service files.
- Documentation & FAQ: Added an HTTP vs. HTTPS threat model FAQ and clarified Windows
shutdown.exe /fand Sleep/Hibernate behavior.
Android App
The Android app (com.mohammask.lanpower) is unchanged from v1.0.0 — the signed LanPower-v1.0.0.apk is attached in the Assets section below for convenience.
Linux & Windows Agents
The updated agents live directly in the repository and can be installed or updated with a single command:
Linux (systemd + Python 3.7+):
curl -fsSL https://raw.githubusercontent.com/Mohammask/LanPower/main/linux/lanpower.sh | sudo bashWindows 10 / 11 (Administrator PowerShell):
irm https://raw.githubusercontent.com/Mohammask/LanPower/main/windows/lanpower.ps1 | iex