Skip to main content

Terminal-based interactive network IP & port scanner

Project description

LANlord 🏰

A fast, clean, hacker-style terminal-based network IP & port scanner built entirely in Python + Textual.

Python 3.10+


Features

Feature Description
Auto-Detect Network Detects active interface, local IP, subnet mask & CIDR range
Manual IP Range Enter start/end IPs or a CIDR block to override detection
Host Discovery ICMP ping scan with TCP fallback for restricted environments
Port Scanning Async TCP connect scan with configurable port list
Live TUI Textual-powered interactive UI with tables, progress bar & log
Export Save results to JSON or CSV
Cross-Platform Works on macOS, Linux & Windows — no root required

Quick Start

# 1. Install dependencies
pip install -r requirements.txt

# 2. Run LANlord
python -m scanner.main

Keyboard Shortcuts

Key Action
D Detect network
S Start scan
E Export JSON
C Export CSV
R Reset
Q Quit

Project Structure

scanner/
├── __init__.py      # Package metadata
├── main.py          # Entry point
├── network.py       # Network detection & IP utilities
├── ping.py          # Host discovery (ICMP + TCP fallback)
├── portscan.py      # Async TCP port scanner
├── export.py        # JSON / CSV export
├── ui.py            # Textual terminal UI
└── styles.tcss      # Textual CSS theme

Usage

  1. Launch the app → python -m scanner.main
  2. Press D to auto-detect your network
  3. Optionally edit the IP range and ports in the Network tab
  4. Press S to start scanning
  5. Watch live results in the Results tab and logs in the Log tab
  6. Export results from the Export tab (JSON / CSV)

Configuration

Default Ports

The default scan targets these common ports:

22, 80, 443, 3306, 8080

Enter a custom list in the Ports input field using:

  • Single ports: 80
  • Comma-separated: 22,80,443
  • Ranges: 1-1024
  • Mixed: 22,80,100-200,443,8080-8090

Dependencies

  • textual — Terminal UI framework
  • rich — Rich text rendering
  • psutil — Network interface detection

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

lanlord-1.0.2.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

lanlord-1.0.2-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file lanlord-1.0.2.tar.gz.

File metadata

  • Download URL: lanlord-1.0.2.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for lanlord-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ac632c018bd48a362d5869d5d7c07fee60ae3124ea5cd9db32e51ba2148fc3d7
MD5 4d090b2073494ea80e548d05a384851b
BLAKE2b-256 3408483de8831257452c32e74a8451f69efd6198f784f5b7db879a5449e67eb4

See more details on using hashes here.

File details

Details for the file lanlord-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: lanlord-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for lanlord-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 83b5fa6b59f8478fd5f56a8df6e6038605e063a06bbe2f9ce229128db8b4b35b
MD5 1757e2744e447d5da56650a13def28bf
BLAKE2b-256 3f65b1d1252f3749cec241ae20793a5299508f394aa91e77a1f27bde34366554

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