WebMap is a web interface for running the nmap security audit tool from a browser.
- Originally created in 2008 as a PHP script (
PHP-NMAP) - Forked in 2012 into an object-oriented PHP class
- Updated in 2021 inside Docker using Kali
- This repository has been modernised into a Python/Flask application.
- 2008 (v0.2): Initial procedural PHP interface created by Morgan Collins.
- 2012 (v1.4): Refactored into a custom PHP class and updated with xHTML rendering by K. Holz published phpclasses
- 2021 (v2.0): containerized with Docker on Kali Linux.
- 2026 (v3.0): Complete modern rewrite:
- Replaced PHP runtime with a Python 3 / Flask web stack.
- Replaced custom inline CSS with Bootstrap 5 (Dark Theme) and Bootstrap Icons.
- Configured dynamic assets switching between public CDNs and local fallback files (
USE_CDNenv variable). - Resolved container privileges using Linux file capabilities (
cap_net_raw,cap_net_admin) viasetcap. Nmap can execute privileged operations (e.g.,-OOS detection,-sSSYN scans) without running the Flask process asroot. - Added real-time output streaming to the browser terminal via Server-Sent Events / Fetch API streams.
Build and launch the application directly using Docker:
docker build -t webmap-app .
docker run -d -p 8080:8080 --name webmap webmap-appInstall and set permissions
sudo apt install nmap
sudo visudoAdd current user to sudoer file for nmap
<username> ALL=(ALL) NOPASSWD: /usr/bin/nmapRun with uv
curl -LsSf https://astral.sh/uv/install.sh | sh
uv run app.py