Web Interface

Access NetScan through a modern browser-based interface for scanning, lookups, and monitoring.

Start Web Server

# Default port 8080
netscan -w

# Custom port
netscan -w -p 3000

# Bind to all interfaces (network access)
netscan -w --bind 0.0.0.0

Then open http://localhost:8080 in your browser.

Features

  • MAC Lookup — Enter any MAC address for instant vendor lookup
  • Network Scanner — One-click scan with visual results
  • Device List — Sortable, searchable device table
  • Scan History — View and compare previous scans
  • Export — Download results as JSON/CSV
  • Real-time Updates — Live scan progress

REST API

The web interface exposes a REST API:

# MAC lookup
curl http://localhost:8080/api/lookup/00:50:56:C0:00:08

# Start scan
curl -X POST http://localhost:8080/api/scan

# Get devices
curl http://localhost:8080/api/devices

# Server status
curl http://localhost:8080/api/status

API Responses

// GET /api/lookup/00:50:56:C0:00:08
{
  "mac": "00:50:56:C0:00:08",
  "vendor": "VMware, Inc.",
  "oui": "00:50:56"
}

// GET /api/devices
{
  "devices": [
    {"ip": "192.168.1.1", "mac": "00:11:22:AA:BB:CC", "vendor": "Netgear"},
    {"ip": "192.168.1.10", "mac": "AC:DE:48:00:11:22", "vendor": "Apple, Inc."}
  ],
  "count": 2,
  "last_scan": "2024-01-15T14:30:00Z"
}

Docker

# Run web interface in Docker
docker run -d -p 8080:8080 --network host --cap-add NET_RAW netscan -w

# Or with docker-compose
docker compose --profile web up -d

Security

⚠️ Warning: The web interface has no authentication by default. Only expose on trusted networks or add a reverse proxy with authentication.
# Only bind to localhost (default, safe)
netscan -w

# Expose to network (use with caution)
netscan -w --bind 0.0.0.0