pingr
A blazing fast, modern network scanner with beautiful terminal output and multiple export formats. Alternative to tools like fping and nmap host discovery.
✨ Features
- 🚀 Blazing Fast: Async parallel scanning with up to 10,000 concurrent threads
- 🎨 Beautiful Output: Color-coded RTT times show network health at a glance
- 📊 Multiple Export Formats: JSON, CSV, nmap, and plain text
- 🧠 Smart Defaults: Auto-optimizes threads, enables hostname resolution and adaptive timeout
- 📈 Detailed Statistics: RTT measurements, packet loss, and response time analysis
- 🔍 DNS Resolution: Automatic hostname lookups with custom DNS server support (disable with
-n) - 🪟 SMB Support: Query Windows hostnames via SMB (port 445) - most reliable method!
- 📡 NetBIOS Support: Query Windows hostnames via NetBIOS (port 137) - lightweight alternative
- 📁 File Input: Bulk scanning from target lists
- 🛡️ Interrupt Handling: Graceful Ctrl-C with automatic result saving
- 💻 Script-Friendly: Simple mode outputs clean IP lists for piping
- ⚡ Cross-Platform: Works on Linux, macOS, Windows, and ARM devices
Installation
Quick Start
# Show help
# Simple scan with automatic hostname resolution
# Fast scan without hostname resolution
# Clean IP list output for scripts
# Scan multiple networks from file
Usage
pingr <CIDR>... [OPTIONS]
pingr -i <FILE> [OPTIONS]
Arguments:
<CIDR> Network(s) in CIDR notation
Options:
-i, --input <FILE> Input file with targets
-s, --simple Simple mode - IP addresses only
-n, --no-resolve Skip hostname resolution
--dns-server <IP> Custom DNS server (e.g., domain controller)
--netbios Use NetBIOS name resolution (great for Windows)
--smb Use SMB hostname query (most reliable for Windows)
-q, --quiet Quiet mode (minimal output)
-v, --verbose Show unreachable hosts
-t, --threads <N> Concurrent threads (auto)
-c, --count <N> Ping attempts per host (1)
-o, --output <FILE> Save results to file
-f, --format <FMT> Output format (text/json/both)
--timeout <SEC> Ping timeout in seconds (1)
--stats Show RTT statistics
--no-adaptive Disable adaptive timeout
--no-color Disable colored output
--export <FMT> Export format (csv/nmap)
-h, --help Show help message
Examples
Basic Scanning
# Simple scan with beautiful output
# Fast scan without DNS resolution
# Multiple networks
# Use custom DNS server (e.g., domain controller)
# Use NetBIOS for Windows networks (no DNS setup required!)
# Use SMB for most reliable Windows hostname detection
Corporate Network Scanning
When scanning internal corporate networks, you have multiple options for hostname resolution:
Option 1: SMB (Most Reliable for Windows)
SMB queries directly retrieve hostnames from Windows hosts:
# Get Windows hostnames via SMB (port 445)
# SMB with statistics
# Export with SMB-resolved names
Option 2: NetBIOS (Lightweight Alternative)
NetBIOS queries work even without reverse DNS configured:
# Get Windows hostnames via NetBIOS (port 137)
# NetBIOS with statistics
# Export with NetBIOS names
Option 3: Custom DNS Server
Use your domain controller if reverse DNS zones are configured:
# Scan with domain controller DNS
# Multiple networks with DC DNS
# Export results with hostnames from AD
Script Integration
# Clean IP list for piping
|
# Use in bash scripts
for; do
done
# Save to file for later processing
Bulk Scanning
Create a targets.txt file:
# Corporate networks
192.168.1.0/24
192.168.2.0/24
10.0.0.0/24
# Branch offices
10.10.10.0/24
10.10.20.0/24
# Single servers
10.0.0.10
192.168.1.1
Then scan:
# Scan all networks from file
# With full features
# Simple mode for automation
Enterprise Network Audit
# Comprehensive scan with all features
Interrupt Handling
# Start a large scan
# Press Ctrl-C anytime to save partial results
# Results automatically saved to pingr_interrupted_TIMESTAMP.txt/json
Understanding RTT Colors
The tool color-codes response times for quick network health assessment:
- 🟢 Green (0-10ms): Excellent - Local network, wired connections
- 🟡 Yellow (11-50ms): Good - Normal Wi-Fi, acceptable latency
- 🟠 Orange (51-100ms): Fair - Slower devices, potential congestion
- 🔴 Red (100ms+): Poor - Network issues, investigate these hosts
Performance Guide
| Network Size | Hosts | Recommended Threads | Scan Time |
|---|---|---|---|
| /24 | 254 | 256 | ~2 sec |
| /22 | 1,022 | 512 | ~5 sec |
| /20 | 4,094 | 1,024 | ~10 sec |
| /16 | 65,534 | 4,096 | ~30 sec |
| /12 | 1,048,574 | 8,192 | ~5 min |
Target File Format
The input file supports:
- CIDR notation:
192.168.1.0/24 - Single IPs:
10.0.0.1(converted to /32) - Comments: Lines starting with
# - Empty lines are ignored
Building from Source
Cross-Compilation
# Install cross
# For Raspberry Pi
# For Ubuntu/Debian
# For Windows
Platform Support
- ✅ Linux (x86_64, aarch64, armv7)
- ✅ macOS (Intel & Apple Silicon)
- ✅ Windows (with administrator privileges)
- ✅ Raspberry Pi (all models)
- ✅ Docker containers (with --cap-add=NET_RAW)
Docker Usage
FROM rust:latest
RUN cargo install pingr
ENTRYPOINT ["pingr"]
Requirements
- Privileges: Requires root/sudo for ICMP raw sockets
- Rust: 1.70+ for building from source
- Memory: ~50MB for /16 network scan
- Network: ICMP echo requests must be allowed
Changelog
v0.3.6 (2024-01-23)
-
✨ New Features:
- SMB Hostname Query: Added
--smbflag for Windows hostname queries via SMB (port 445) - most reliable method - NetBIOS Name Resolution: Added
--netbiosflag for Windows hostname queries via NetBIOS (port 137) - lightweight alternative - Works great for corporate Windows networks without reverse DNS configured
- Get hostnames like
1000-00555-LT,CORP-LKAMINSKIdirectly from Windows hosts - Both methods work without DNS configuration
- Debug output for troubleshooting hostname resolution issues
- SMB Hostname Query: Added
-
✨ Improvements:
- Added DNS resolution statistics to
--statsoutput showing resolved vs unresolved hostnames - Better error handling for custom DNS server queries
- Comprehensive help text with all resolution methods
- Added DNS resolution statistics to
v0.3.5 (2024-01-XX)
- 🐛 Bug Fixes:
- Fixed version display consistency
- Cleaned up debug output from DNS resolution
v0.3.3 (2024-01-XX)
-
✨ New Features:
- Custom DNS Server: Added
--dns-serverflag to specify custom DNS server (e.g., domain controller) for hostname resolution - Ideal for corporate networks where internal DNS has better PTR records than system DNS
- Custom DNS Server: Added
-
🐛 Bug Fixes:
- Fixed hostname resolution: Corrected Result handling in spawn_blocking (was using
.unwrap_or(None)instead of.ok().flatten()) - DNS lookups now properly return hostnames instead of silently failing
- Version consistency across all files
- Fixed hostname resolution: Corrected Result handling in spawn_blocking (was using
v0.3.2 (2024-01-XX)
- 🐛 Bug Fixes:
- Attempted fix for hostname resolution (didn't work)
- Fixed version consistency across all files
- Improved async handling of DNS resolution with proper
spawn_blocking
v0.3.1 (2024-01-XX)
- 🔧 Minor improvements and bug fixes
v0.3.0 (2024-01-XX)
- 🔄 Breaking Changes:
- Hostname resolution now ON by default (use
-nto disable) - Adaptive timeout now ON by default (use
--no-adaptiveto disable) - No more default 192.168.1.0/24 scan - shows help instead
- Hostname resolution now ON by default (use
- ✨ New Features:
- Added
-s/--simplemode for clean IP-only output - Help menu displayed when run without arguments
- Improved script integration support
- Added
- 🐛 Fixes:
- Better interrupt handling
- Improved error messages
v0.2.0 (2024-01-XX)
- 🎯 File Input Support: Read targets from text files with
-iflag - 🌐 Multi-Network Scanning: Scan multiple networks in one run
- 🛡️ Interrupt Handling: Graceful Ctrl-C with automatic result saving
- 📊 Network Grouping: Results organized by source network
- 🔧 Enhanced Progress: Better progress tracking for multiple networks
- 📈 Improved Statistics: Added RTT min/max/avg calculations
v0.1.0 (2024-01-XX)
- Initial release
- Fast async scanning with customizable concurrency
- Colorful terminal output with RTT color-coding
- Multiple export formats (JSON, CSV, nmap)
- Basic RTT statistics and DNS resolution
- Auto-optimization for thread count
Tips & Tricks
Speed Optimization
# Maximum speed (no DNS, high threads)
# Balanced (auto threads, with DNS)
Network Monitoring
# Regular monitoring script
#!/bin/bash
while ; do
done
Integration with Other Tools
# Find and scan web servers
|
# SSH availability check
|
# Generate Ansible inventory
|
Troubleshooting
Permission Denied
# Linux: Set capabilities to avoid sudo
# macOS: Always requires sudo
# Windows: Run as Administrator
No Results
- Check firewall rules allow ICMP
- Verify network connectivity
- Try increasing timeout:
--timeout 3 - Some hosts may block ICMP
Slow Performance
- Reduce thread count for congested networks
- Use
-nto skip DNS resolution - Check system ulimits:
ulimit -n
No Hostnames Showing
If you're not seeing hostnames even with DNS resolution enabled:
-
Check if PTR records exist:
# Test reverse DNS lookup # Or with specific DNS server -
Common reasons:
- Your DNS server doesn't have reverse DNS (PTR) zones configured
- Internal IPs often don't have PTR records by default
- Only the domain controller may have complete records
-
Solutions:
- Use
--dns-serverwith your domain controller IP:sudo pingr --dns-server 10.0.0.1 192.168.1.0/24 - Ask your network admin to configure reverse DNS zones for your networks
- Use
--statsflag to see DNS resolution success rate
- Use
-
Setting up reverse DNS (for admins):
- Windows DNS: Create reverse lookup zones (e.g.,
13.0.10.in-addr.arpafor 10.0.13.0/24) - BIND: Add reverse zone files with PTR records
- Ensure your DHCP server updates DNS with hostnames
- Windows DNS: Create reverse lookup zones (e.g.,
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
# Fork and clone
# Create feature branch
# Make changes and test
# Commit and push
Author
Chris Neuwirth CNeuwirth@networksgroup.com GitHub: @cybrly
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built with surge-ping for ICMP functionality
- Uses tokio for async runtime
- Terminal colors by colored
- Progress bars from indicatif
Star History
Note: pingr requires root/administrator privileges to send ICMP packets. This is a system requirement for raw socket access, not a limitation of the tool.
For more information, bug reports, or feature requests, please visit the GitHub repository.