Use sudo nmap to allow ARP scan with restricted sudoers

This commit is contained in:
n0mad1k
2026-03-25 06:28:48 -04:00
parent 12f8a37dc4
commit 59cfb6b07a
+1 -1
View File
@@ -64,7 +64,7 @@ def scan_subnet(cidr: str) -> list[dict]:
"""Run nmap ping scan, return list of {ip, mac, name}."""
try:
out = subprocess.check_output(
["nmap", "-sn", "-PR", "--host-timeout", "5s", cidr],
["sudo", "nmap", "-sn", "-PR", "--host-timeout", "5s", cidr],
text=True, stderr=subprocess.DEVNULL
)
except Exception: