A fast, clean, hacker-style terminal-based network IP & port scanner built entirely in Python + Textual.
| 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 |
# 1. Install dependencies
pip install -r requirements.txt
# 2. Run LANlord
python -m scanner.main| Key | Action |
|---|---|
D |
Detect network |
S |
Start scan |
E |
Export JSON |
C |
Export CSV |
R |
Reset |
Q |
Quit |
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
- Launch the app →
python -m scanner.main - Press D to auto-detect your network
- Optionally edit the IP range and ports in the Network tab
- Press S to start scanning
- Watch live results in the Results tab and logs in the Log tab
- Export results from the Export tab (JSON / CSV)
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
MIT