A powerful, fast, and easy-to-use network scanner written in Go. Discover devices, scan ports, grab service banners, and generate comprehensive reports of your local network.
✨ Features
- 🚀 Fast Network Discovery - Quickly identify active hosts on your network
- 🔌 Port Scanning - Detect open ports and running services
- 🏷️ Banner Grabbing - Identify service versions and details
- 📊 Multiple Output Formats - JSON and HTML reports
- 🎯 Flexible Scanning Modes - Quick scans or deep analysis
- 🌐 CIDR Notation Support - Scan specific network ranges
- 💬 Verbose Logging - Detailed output for troubleshooting
📋 Prerequisites
- Go 1.20 or higher
- Network access (some features may require elevated privileges)
🚀 Installation
Clone the Repository
git clone https://github.com/gatiella/network_scanner.git
cd network_scannerInstall Dependencies
go mod downloadBuild the Project
go build -o network_scanner📖 Usage
Basic Scan
Scan your local network with default settings:
go run main.goOr with the compiled binary:
./network_scannerVerbose Scan with Specific CIDR
Scan a specific network range with detailed output:
go run main.go -cidr 192.168.1.0/24 -vDeep Scan with HTML Report
Perform a comprehensive scan of all ports and generate an HTML report:
go run main.go -deep -htmlQuick Scan
Fast scan without banner grabbing, with JSON output:
go run main.go -quick -output results.json⚙️ Command-Line Options
| Flag | Description | Default |
|---|---|---|
-cidr |
Network range to scan in CIDR notation | Auto-detect local network |
-v |
Enable verbose output | false |
-deep |
Scan all 65535 ports (slower but thorough) | false |
-quick |
Skip banner grabbing for faster scans | false |
-html |
Generate HTML report | false |
-output |
Specify output file path | scan_results.json |
📊 Output Examples
JSON Output
{
"scan_time": "2025-10-08T10:30:00Z",
"network": "192.168.1.0/24",
"hosts": [
{
"ip": "192.168.1.1",
"hostname": "router.local",
"ports": [
{
"port": 80,
"state": "open",
"service": "http",
"banner": "nginx/1.18.0"
}
]
}
]
}HTML Report
The HTML report includes:
- Visual network topology
- Color-coded host status
- Expandable port details
- Service version information
- Export and filter capabilities
🔐 Security Considerations
- Always obtain proper authorization before scanning
- Be aware of your organization's security policies
- Use responsibly and ethically 🛠️ Development
Running Tests
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Built with ❤️ using Go
- Inspired by classic network scanning tools
📧 Contact
For questions, issues, or suggestions, please open an issue on GitHub.
Note: This tool is intended for legitimate network administration and security testing purposes only.