Skip to main content

Fast IP scanner — multithreaded Ping and ARP scanning

Project description

ipscan banner

ipscan

Fast IP scanner — multithreaded Ping and ARP scanning (Windows, Linux, macOS)

PyPI version Python OS License

Language: English · 繁體中文 · 简体中文 · 日本語 · 한국어 · Deutsch · Français · Italiano · Español · Português BR · Русский


Table of contents

  • Quick start
  • Features
  • CLI tools
  • Python API
  • Performance notes
  • Requirements
  • Contributing

Quick start

Install from PyPI:

pip install ipscan

Windows users: Install optional Windows-optimized ping support:

pip install "ipscan[windows]"

Note: Linux users — see Linux Setup below for best performance.

CLI

fping           # High-speed continuous ping (interactive)
sping           # Simple range ping scan
sarp            # ARP range scan

Python API

Ping 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")

Features

  • 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

Linux Setup (Recommended)

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 sudo to 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.

Platform Details

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

Usage Examples

Linux ARP scanning (requires sudo)

sudo sarp
# Enter IP range when prompted

High-speed continuous ping

fping
# Enter target IP and interval

Range ping scanning

sping
# Enter start and end IP addresses

Requirements

  • Python 3.7+
  • Cross-platform support: Windows, Linux, macOS
  • Dependencies:
    • tqdm (progress bars)
    • scapy (ARP packet generation)
    • ping3 (Windows optimization, optional)

Contributing

Issues and PRs are welcome. If you like this project, consider starring it.


Made with ❤️ for network tinkerers.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipscan-1.4.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipscan-1.4.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file ipscan-1.4.0.tar.gz.

File metadata

  • Download URL: ipscan-1.4.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for ipscan-1.4.0.tar.gz
Algorithm Hash digest
SHA256 16cf845a2af09235e86017fd84fe2139907114959b5a3eca0eaa7563a381188b
MD5 96eac6593d1de503553d1c1526c4e47e
BLAKE2b-256 581b7fa8d0eea9c29d1875288d29eeae33b3336a856e0bf0e89df99caa42b4a0

See more details on using hashes here.

File details

Details for the file ipscan-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: ipscan-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for ipscan-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a9684f9ca4c7f10d5c99578071fc09c7810eba14d745dc9aa878d606ba8d90c
MD5 8b076103e166d7a4aaee6854f4158a37
BLAKE2b-256 ccc80a384d7f3effd43d4d30d4d4fd6bde73f312d4b2adabd258583c8fd7dc98

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page