Fast IP scanner — multithreaded Ping and ARP scanning (Windows, Linux, macOS)
Language: English · 繁體中文 · 简体中文 · 日本語 · 한국어 · Deutsch · Français · Italiano · Español · Português BR · Русский
- Quick start
- Features
- CLI tools
- Python API
- Performance notes
- Requirements
- Contributing
Install from PyPI:
pip install ipscanWindows users: Install optional Windows-optimized ping support:
pip install "ipscan[windows]"Note: Linux users — see Linux Setup below for best performance.
fping # High-speed continuous ping (interactive)
sping # Simple range ping scan
sarp # ARP range scanPing scan:
from ipscan import ping_range, PingScanner
online_hosts = ping_range("192.168.1.1", "192.168.1.254")
scanner = PingScanner(timeout=1.0)
results = scanner.scan_range("10.0.0.1", "10.0.0.100")ARP scan:
from ipscan import arp_range, ArpScanner
host_info = arp_range("192.168.1.1", "192.168.1.254")
for ip, mac in host_info.items():
print(f"{ip} -> {mac}")
scanner = ArpScanner()
results = scanner.scan_range("10.0.0.1", "10.0.0.100")- Cross-platform: Windows, Linux, macOS support with automatic OS detection
- Multithreaded scanning: High-speed concurrent operations
- Smart implementations: Platform-optimized for best performance
- Windows: Native SendARP API + ping3 library
- Linux: Direct scapy ARP packets + system ping
- macOS: System arp + ping commands
- Simple API: Unified interface across all platforms
- Progress tracking: Real-time progress bars and clean output
For best performance on Linux, grant Python raw socket capabilities:
# Enable fast Ping scanning (raw ICMP socket, ~100x faster)
sudo setcap cap_net_raw+ep $(readlink -f $(which python3))
# Enable fast Ping + ARP scanning
sudo setcap cap_net_raw,cap_net_admin+ep $(readlink -f $(which python3))Without this step:
- Ping scanning still works but falls back to subprocess (slower)
- ARP scanning requires
sudoto run
To remove the capability (restore default):
sudo setcap -r $(readlink -f $(which python3))Note: This only needs to be done once per Python installation. If using a virtualenv, run the command against the venv's Python binary.
| Feature | Windows | Linux | macOS |
|---|---|---|---|
| Ping scanning | ping3 library | raw ICMP socket (with setcap) / system ping (fallback) | system ping |
| ARP scanning | SendARP API | scapy packets | arp command |
| Permissions | No special permissions | setcap recommended (see above) | No special permissions |
| Performance | Optimized | Optimized (with setcap) | Good |
sudo sarp
# Enter IP range when promptedfping
# Enter target IP and intervalsping
# Enter start and end IP addresses- Python 3.7+
- Cross-platform support: Windows, Linux, macOS
- Dependencies:
tqdm(progress bars)scapy(ARP packet generation)ping3(Windows optimization, optional)
Issues and PRs are welcome. If you like this project, consider starring it.