A powerful network device discovery and port scanning tool built with Blazor and .NET 9. Discover all devices on your local network and identify what services they're running.
- 🚀 Parallel Network Scanning - Uses
Task.WhenAllto scan hundreds of IP addresses simultaneously - 🔌 Port Scanning - Scans 50+ common ports using
TcpClient - 🎯 Device Type Detection - Automatically identifies device types based on open ports
- 📊 Interactive Dashboard - Real-time statistics and progress tracking
- 🗺️ Multiple Views - Grid, List, and Topology network map views
⚠️ Risk Detection - Highlights devices with potentially risky open ports- 🔄 Auto-Refresh - Background service refreshes known devices every 30 seconds
- 💾 Persistent Storage - Discovered devices saved to JSON and restored on startup
- �icing Vendor Detection - MAC address OUI lookup for device manufacturer identification
The interactive network map shows all discovered devices with their types and connections.
| Icon | Type | Detection Criteria |
|---|---|---|
| 🌐 | Router | Ports 80, 443, 53 |
| 🖥️ | Web Server | Ports 80, 443, 8080 |
| 🖨️ | Printer | Ports 9100, 515, 631 |
| 📷 | Camera | Ports 554, 8080 |
| 📁 | File Server | Ports 445, 139 |
| 📺 | Smart TV | Ports 8008, 8443 |
| 🏠 | Smart Home | Ports 1883 (MQTT) |
| 🎮 | Game Console | Ports 3074, 3478 |
| 💻 | Computer | Ports 3389, 22, 5900 |
| 🗄️ | Database | Ports 3306, 5432, 27017 |
| 📧 | Mail Server | Ports 25, 465, 587 |
| 🎬 | Media Server | Port 32400 (Plex) |
- Clone the repository:
git clone https://github.com/ravindrabhartiya/LANWatcher.NET.git
cd LANWatcher.NET- Build the project:
dotnet build- Run the application:
dotnet run- Open your browser and navigate to
http://localhost:5182
-
Configure Scan Settings
- Set the IP range (auto-detected from your network)
- Choose Quick Scan (common ports) or Deep Scan (extended ports)
- Adjust parallel scan count for performance
-
Start Scanning
- Click "🚀 Start Scan" to begin discovery
- Watch real-time progress as devices are found
-
Explore Results
- Switch between Grid, List, and Topology views
- Click on any device to see detailed port information
- Review the stats dashboard for network overview
LanWatcher.NET/
├── Models/
│ ├── NetworkDevice.cs # Device model with type detection
│ └── ScanProgress.cs # Progress tracking & scan options
├── Services/
│ ├── NetworkScanner.cs # Core scanning using Ping & TcpClient
│ ├── DeviceRepository.cs # Persistent device storage (JSON)
│ ├── DeviceRefreshService.cs # Background refresh every 30 seconds
│ ├── ScanService.cs # Orchestrates scanning operations
│ ├── OuiLookupService.cs # MAC address vendor lookup
│ └── PortDefinitions.cs # Port-to-service mappings
├── Components/
│ ├── DeviceCard.razor # Individual device display
│ ├── NetworkMap.razor # Grid/List/Topology views
│ ├── ProgressPanel.razor # Scan progress display
│ ├── ScanControls.razor # Scan configuration UI
│ └── StatsDashboard.razor # Summary statistics
└── wwwroot/css/
└── scanner.css # Dark theme styling
LanWatcher.NET leverages C#'s async/await pattern with Task.WhenAll to achieve high-performance parallel scanning:
- Parallel IP Scanning: Configurable 10-100 concurrent connections
- Efficient Port Scanning: Non-blocking TCP connection attempts
- Memory Efficient: Uses semaphores to limit resource usage
- Background Refresh: Keeps device status up-to-date every 30 seconds
- Debounced Persistence: Saves to disk without blocking the UI
- This tool is designed for scanning your own network only
- Always obtain proper authorization before scanning networks
- Some networks may flag port scanning activity
- Use responsibly and ethically
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Blazor
- Inspired by tools like Nmap and Angry IP Scanner
- Icons from native emoji support
Your Name - Ravindra Bhartiya (satyamravindra@gmail.com)
Project Link: https://github.com/ravindrabhartiya/LANWatcher.NET
⭐ Star this repo if you find it useful!