Find devices on your LAN without the headache.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scanlan-0.1.0.tar.gz.
File metadata
- Download URL: scanlan-0.1.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4175721dffeb5a1acb365c6ed35d6ec312385ce9fcea21101e2a81e3d3affa7a
|
|
| MD5 |
3a5854dbc06a82ca0f38ae1f2d895b88
|
|
| BLAKE2b-256 |
ed6d0276d69b827dc4dc76c3cb5b14814415e6efa17b6151d089993fa13bcad1
|
File details
Details for the file scanlan-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scanlan-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
743804af048775a706300006d2daf92dd4443cc14e18f57935d54915816af50a
|
|
| MD5 |
53f351d91cc4d0408342e87077ffefa6
|
|
| BLAKE2b-256 |
1a4079814f8d5ad08e1feacd158c91e324259a2cfbb4ee16bec4e32e77249a8f
|