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.0.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.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lanlord-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 4718dbcb7e04968f9181a5d459bcaebf566d20238745911bf2c377527c85ccb8
MD5 87a908cce13b3d2d1cc0e684c43539e0
BLAKE2b-256 8e5caee26eb46c588acdb7a7953796c53c1f85b573d50774f19ec6106cc12c2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lanlord-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e507f1bd67c44581976659655a84ff6c8ab1f9b0644d8a451005720197e8ab55
MD5 d6dd54c762c772b2c747ad28f7aa05ae
BLAKE2b-256 0511935056fd83ab64b1a77631d846d99c82458a0f318f8b1cf39448728d970b

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