scanlan
Find devices on your LAN without losing your mind.
scanlan → 192.168.1.0/24
IP ADDRESS HOSTNAME MAC ADDRESS VENDOR
──────────────────────────────────────────────────────────────────────────
192.168.1.1 router.local A4:77:33:12:AB:CD Google
192.168.1.42 — B8:27:EB:4F:12:99 Raspberry Pi Foundation
192.168.1.55 macbook-pro.local AC:BC:32:88:11:22 Apple
192.168.1.101 android-phone.local 38:AA:3C:77:44:55 Samsung
4 devices found on 192.168.1.0/24
nmap is great. But when you just want to find your new Pi on the network, it's overkill. scanlan does the one thing you actually need: scan your subnet, show you what's there, and tell you what it is.
Zero dependencies. Pure stdlib. Works on Linux, macOS, and Windows.
Install
pip install scanlan
Note: Scanning requires sending ICMP pings and reading the ARP table. On Linux/macOS you may need to run with
sudo(or grant ping capabilities).
Usage
scanlan [options]
Just run it
scanlan
Auto-detects your subnet and scans it. Raspberry Pi rows are highlighted in green.
Check open ports too
scanlan -p
Checks ports: 22 (ssh), 80 (http), 443 (https), 8080, 8443, 3389 (rdp), 5900 (vnc), 554 (rtsp), 1883 (mqtt), 8883
Wait for a device to appear
scanlan -w
Re-scans every 5 seconds and prints new devices as they show up. Perfect for waiting on a Pi to boot.
scanlan -w --interval 10 # check every 10 seconds instead
Scan a specific subnet
scanlan -s 10.0.0.0/24
JSON output (for scripts)
scanlan --json
scanlan --json | jq '.[] | select(.vendor | contains("Raspberry Pi"))'
All options
-s, --subnet CIDR Subnet to scan (auto-detected if not given)
-p, --ports Check common ports on each device
-w, --watch Watch for new devices continuously
--interval SECONDS Seconds between watch-mode scans (default: 5)
--json Output as JSON
--workers N Parallel workers (default: 64)
--version Show version
How it works
- Pings every host in the subnet in parallel (default 64 workers)
- Reads the ARP table for MAC addresses of responding hosts
- Looks up the MAC OUI against a bundled vendor table (no internet needed)
- Reverse DNS each IP for a hostname
- Optionally checks ports with TCP connect
The bundled OUI table covers the most common home/office vendors (Raspberry Pi, Apple, Google, Amazon, TP-Link, ASUS, Samsung, Ubiquiti, etc.).
Permissions
| Platform | Required |
|---|---|
| Linux | sudo or CAP_NET_RAW for ping |
| macOS | sudo or group admin |
| Windows | Run as Administrator |
Quick fix on Linux (no sudo every time):
sudo setcap cap_net_raw+ep $(which python3)
License
MIT
Release files for scanlan 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scanlan-0.1.0.tar.gz | 13.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scanlan-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:26.4 kB
Release files / scanlan-0.1.0.tar.gz
| Download URL | scanlan-0.1.0.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4175721dffeb5a1acb365c6ed35d6ec312385ce9fcea21101e2a81e3d3affa7a
|
|
BLAKE2b-256 checksum How to use checksums |
ed6d0276d69b827dc4dc76c3cb5b14814415e6efa17b6151d089993fa13bcad1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / scanlan-0.1.0-py3-none-any.whl
| Download URL | scanlan-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
743804af048775a706300006d2daf92dd4443cc14e18f57935d54915816af50a
|
|
BLAKE2b-256 checksum How to use checksums |
1a4079814f8d5ad08e1feacd158c91e324259a2cfbb4ee16bec4e32e77249a8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|