feat: improve service detection — expanded signatures, port hints, better nmap args
- Expand service_signatures.json from 35 → ~120 entries covering *arr apps, smart-home (HA, MQTT, ESPHome), cameras (RTSP, Dahua, Tapo, Reolink), network gear (MikroTik, UniFi, Pi-hole), auth (Authelia, Authentik, Vault), monitoring (Grafana, InfluxDB, Loki, Uptime Kuma), containers (Portainer), and many more home lab services - Expand nmap port range to cover home lab ports (8989, 7878, 8123, 554, 1883, etc.) and increase --host-timeout from 30s to 120s for reliable -sV detection - Add _PORT_TYPE_HINTS fallback in suggest_node_type for ports without signatures (cameras→iot, MQTT→iot, Proxmox→proxmox, MikroTik→router, etc.) - Show actual port/protocol (e.g. TCP/9999) instead of "unknown_service" so all open ports are visible even when not matched - Update tests to reflect new unknown-port label format
This commit is contained in:
@@ -71,7 +71,7 @@ def test_fingerprint_ports_known_ports():
|
||||
def test_fingerprint_ports_unknown_port():
|
||||
results = fingerprint_ports([{"port": 9999, "protocol": "tcp"}])
|
||||
assert len(results) == 1
|
||||
assert results[0]["service_name"] == "unknown_service"
|
||||
assert results[0]["service_name"] == "TCP/9999"
|
||||
assert results[0]["icon"] is None
|
||||
assert results[0]["category"] is None
|
||||
|
||||
@@ -79,7 +79,7 @@ def test_fingerprint_ports_unknown_port():
|
||||
def test_fingerprint_ports_mixed():
|
||||
results = fingerprint_ports([{"port": 22, "protocol": "tcp"}, {"port": 9999, "protocol": "tcp"}])
|
||||
assert results[0]["service_name"] == "SSH"
|
||||
assert results[1]["service_name"] == "unknown_service"
|
||||
assert results[1]["service_name"] == "TCP/9999"
|
||||
|
||||
|
||||
def test_fingerprint_ports_empty():
|
||||
|
||||
Reference in New Issue
Block a user