Expand description
Platform-specific port scanning.
- macOS: parses
lsof -Foutput + batchpscalls (2 per cycle) - Linux: reads
/proc/net/{tcp,tcp6,udp,udp6}viaprocfscrate
Functions§
- scan_
ports - Scan all visible network ports (unprivileged).
- scan_
ports_ elevated - Scan with cached sudo credentials (
sudo -n). - scan_
ports_ with_ sudo - Scan with explicit sudo password piped via stdin (
sudo -S).