README
ΒΆ
NameAlive - Network Host Discovery Tool
High-performance network host discovery and identification tool using mDNS, NetBIOS, and SSH.
β¨ Features
- π Fast discovery via mDNS (Linux/Mac) and NetBIOS (Windows)
- π Smart fallback to SSH when needed
- π Flexible authentication - SSH keys and passwords
- π Multiple output formats - table, JSON, CSV
- π― Parallel scanning with configurable concurrency
- π Extended information - OS, uptime, MAC address
- π§ Zero dependencies - single binary
π¦ Installation
Via go install (recommended)
go install github.com/dmikushin/namealive@latest
The binary will be installed to $GOPATH/bin/namealive or ~/go/bin/namealive.
From source
git clone https://github.com/dmikushin/namealive.git
cd namealive
make build
sudo make install # Installs to /usr/local/bin
Download pre-built binary
Download the latest release from Releases.
# Linux amd64
wget https://github.com/dmikushin/namealive/releases/latest/download/namealive_linux_amd64.tar.gz
tar xzf namealive_linux_amd64.tar.gz
sudo mv namealive /usr/local/bin/
# macOS
wget https://github.com/dmikushin/namealive/releases/latest/download/namealive_darwin_amd64.tar.gz
tar xzf namealive_darwin_amd64.tar.gz
sudo mv namealive /usr/local/bin/
π Requirements
- Go 1.21+ (for building from source)
- Root privileges or CAP_NET_RAW for ICMP ping
- Linux, macOS, or Windows
π Quick Start
# Scan default range (192.168.1.1-192.168.1.250)
sudo namealive
# Scan specific range
sudo namealive -r 10.0.0.1-10.0.0.100
# CIDR notation
sudo namealive -r 192.168.0.0/24
# Without password prompt (SSH keys only)
namealive --no-password
# Export to JSON
namealive --format json -o network.json
π― How It Works
NameAlive uses a multi-protocol approach for maximum speed and compatibility:
- ICMP Ping - Checks if host is alive
- mDNS Query - Fast hostname resolution for Linux/macOS (Avahi/Bonjour)
- NetBIOS Query - Windows hostname resolution
- SSH Fallback - When fast methods fail
βββββββββββ ββββββββ βββββββββββ βββββββββββ βββββββ
β IP Scan ββββββΆβ Ping ββββββΆβ mDNS ββββββΆβ NetBIOS ββββββΆβ SSH β
βββββββββββ ββββββββ β (2 sec) β β (2 sec) β β(opt)β
β βββββββββββ βββββββββββ βββββββ
βΌ
[Skip if not alive]
π Command Line Options
Flags:
-r, --range string IP range to scan (default "192.168.1.1-192.168.1.250")
-u, --user string SSH username (default: current user)
--port int SSH port (default 22)
-p, --parallel int Number of parallel connections (default 20)
--timeout duration Connection timeout (default 20s)
--format string Output format: table|json|csv (default "table")
-o, --output string Output file
-v, --verbose Verbose mode
--extended Show extended information
--exclude strings Exclude IP ranges
--include-offline Include offline hosts
--no-password Skip password prompt (SSH keys only)
-h, --help Display help
π Examples
Extended scan with all protocols
sudo namealive --extended --verbose
Large network scan with high parallelism
sudo namealive -r 10.0.0.0/16 -p 50 --timeout 5s
Export results to CSV
namealive --format csv -o hosts.csv --extended
Exclude specific ranges
namealive -r 192.168.1.0/24 --exclude 192.168.1.1 --exclude 192.168.1.254
π€ Output Formats
Table (default)
+--------------+----------+--------+--------+
| IP | HOSTNAME | STATUS | METHOD |
+--------------+----------+--------+--------+
| 192.168.1.5 | server01 | online | mDNS |
| 192.168.1.10 | desktop | online | NetBIOS|
| 192.168.1.15 | laptop | online | SSH |
+--------------+----------+--------+--------+
JSON
[
{
"ip": "192.168.1.5",
"hostname": "server01",
"status": "online",
"method": "mDNS",
"response_time": "2.1ms",
"timestamp": "2024-01-20T10:30:00Z"
}
]
π§ Performance Tuning
- Parallel connections: Increase
-pflag (default: 20, max recommended: 100) - Timeout: Reduce
--timeoutfor faster scans of responsive networks - Exclude ranges: Use
--excludeto skip known empty ranges
π‘οΈ Security
- Passwords are never stored or logged
- SSH connections use standard Go crypto/ssh library
- Host key verification disabled by default (for automation)
- Supports standard SSH key locations
π Building from Source
# Clone repository
git clone https://github.com/dmikushin/namealive.git
cd namealive
# Build
make build
# Run tests
make test
# Install system-wide
sudo make install
# Cross-compile for different platforms
make build-all
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Documentation
ΒΆ
There is no documentation for this package.
Click to show internal directories.
Click to hide internal directories.