Skip to main content

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

  1. Pings every host in the subnet in parallel (default 64 workers)
  2. Reads the ARP table for MAC addresses of responding hosts
  3. Looks up the MAC OUI against a bundled vendor table (no internet needed)
  4. Reverse DNS each IP for a hostname
  5. 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


Download files

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

Source Distribution

scanlan-0.1.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

scanlan-0.1.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

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

Hashes for scanlan-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4175721dffeb5a1acb365c6ed35d6ec312385ce9fcea21101e2a81e3d3affa7a
MD5 3a5854dbc06a82ca0f38ae1f2d895b88
BLAKE2b-256 ed6d0276d69b827dc4dc76c3cb5b14814415e6efa17b6151d089993fa13bcad1

See more details on using hashes here.

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

Hashes for scanlan-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 743804af048775a706300006d2daf92dd4443cc14e18f57935d54915816af50a
MD5 53f351d91cc4d0408342e87077ffefa6
BLAKE2b-256 1a4079814f8d5ad08e1feacd158c91e324259a2cfbb4ee16bec4e32e77249a8f

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