| Crates.io | pingr |
| lib.rs | pingr |
| version | 0.3.9 |
| created_at | 2025-10-22 10:56:35.710995+00 |
| updated_at | 2025-10-23 20:03:02.325657+00 |
| description | A blazing fast network scanner with beautiful terminal output and multiple export formats |
| homepage | https://github.com/cybrly/pingr |
| repository | https://github.com/cybrly/pingr |
| max_upload_size | |
| id | 1895477 |
| size | 131,326 |
A blazing fast, modern network scanner with beautiful terminal output and multiple export formats. Alternative to tools like fping and nmap host discovery.
-n)cargo install pingr
# Show help
pingr
# Simple scan with automatic hostname resolution
sudo pingr 192.168.1.0/24
# Fast scan without hostname resolution
sudo pingr -n 192.168.1.0/24
# Clean IP list output for scripts
sudo pingr -s 192.168.1.0/24
# Scan multiple networks from file
sudo pingr -i targets.txt
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)
--web-server Scan live hosts for web servers and extract titles
-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
# Simple scan with beautiful output
sudo pingr 192.168.1.0/24
# Fast scan without DNS resolution
sudo pingr -n 10.0.0.0/24
# Multiple networks
sudo pingr 192.168.1.0/24 10.0.0.0/24 172.16.0.0/24
# Use custom DNS server (e.g., domain controller)
sudo pingr --dns-server 10.0.0.1 192.168.1.0/24
# Use NetBIOS for Windows networks (no DNS setup required!)
sudo pingr --netbios 192.168.1.0/24
# Use SMB for most reliable Windows hostname detection
sudo pingr --smb 192.168.1.0/24
When scanning internal corporate networks, you have multiple options for hostname resolution:
SMB queries directly retrieve hostnames from Windows hosts:
# Get Windows hostnames via SMB (port 445)
sudo pingr --smb 192.168.1.0/24
# SMB with statistics
sudo pingr --smb --stats 10.0.13.0/24
# Export with SMB-resolved names
sudo pingr --smb -o windows-scan -f both 192.168.1.0/24
NetBIOS queries work even without reverse DNS configured:
# Get Windows hostnames via NetBIOS (port 137)
sudo pingr --netbios 192.168.1.0/24
# NetBIOS with statistics
sudo pingr --netbios --stats 10.0.13.0/24
# Export with NetBIOS names
sudo pingr --netbios -o windows-scan -f both 192.168.1.0/24
Use your domain controller if reverse DNS zones are configured:
# Scan with domain controller DNS
sudo pingr --dns-server 10.0.0.1 192.168.1.0/24
# Multiple networks with DC DNS
sudo pingr --dns-server 10.0.0.1 192.168.1.0/24 192.168.2.0/24
# Export results with hostnames from AD
sudo pingr --dns-server 10.0.0.1 -i corporate-networks.txt -o ad-audit -f both
Automatically discover web servers on live hosts across 20+ common ports:
# Basic web server scanning
sudo pingr --web-server 192.168.1.0/24
# Combined with hostname resolution
sudo pingr --smb --web-server 10.0.13.0/24
# Web servers with statistics
sudo pingr --web-server --stats 192.168.1.0/24
# Scan multiple networks for web servers
sudo pingr --web-server 192.168.1.0/24 10.0.0.0/24
The web server scanner:
# Clean IP list for piping
sudo pingr -s 192.168.1.0/24 | xargs -I {} nmap -sV {}
# Use in bash scripts
for ip in $(sudo pingr -s 192.168.1.0/24); do
echo "Checking $ip..."
ssh admin@$ip uptime 2>/dev/null
done
# Save to file for later processing
sudo pingr -s 192.168.1.0/24 > live_hosts.txt
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
sudo pingr -i targets.txt
# With full features
sudo pingr -i targets.txt -t 5000 --stats -o results -f both
# Simple mode for automation
sudo pingr -s -i targets.txt > all_live_hosts.txt
# Comprehensive scan with all features
sudo pingr \
-i networks.txt \ # Read from file
-t auto \ # Auto-optimize threads
-c 3 \ # 3 pings per host
--stats \ # Show RTT statistics
-v \ # Show all hosts
-o audit_$(date +%Y%m%d) \ # Timestamped output
-f both \ # JSON and text output
--export csv # Also export as CSV
# Start a large scan
sudo pingr -i large_networks.txt -t 5000
# Press Ctrl-C anytime to save partial results
# Results automatically saved to pingr_interrupted_TIMESTAMP.txt/json
The tool color-codes response times for quick network health assessment:
| 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 |
The input file supports:
192.168.1.0/2410.0.0.1 (converted to /32)#git clone https://github.com/cybrly/pingr.git
cd pingr
cargo build --release
sudo ./target/release/pingr
# Install cross
cargo install cross
# For Raspberry Pi
cross build --release --target aarch64-unknown-linux-musl
# For Ubuntu/Debian
cross build --release --target x86_64-unknown-linux-musl
# For Windows
cross build --release --target x86_64-pc-windows-gnu
FROM rust:latest
RUN cargo install pingr
ENTRYPOINT ["pingr"]
docker build -t pingr .
docker run --rm --cap-add=NET_RAW pingr 192.168.1.0/24
✨ New Features:
--web-server flag to scan live hosts for web servers on 20+ common ports
--smb flag for Windows hostname queries via SMB (port 445) - most reliable method--netbios flag for Windows hostname queries via NetBIOS (port 137) - lightweight alternative1000-00555-LT, CORP-LKAMINSKI directly from Windows hosts✨ Improvements:
--stats output showing resolved vs unresolved hostnames✨ New Features:
--dns-server flag to specify custom DNS server (e.g., domain controller) for hostname resolution🐛 Bug Fixes:
.unwrap_or(None) instead of .ok().flatten())spawn_blocking-n to disable)--no-adaptive to disable)-s/--simple mode for clean IP-only output-i flag# Maximum speed (no DNS, high threads)
sudo pingr -n -t 10000 10.0.0.0/16
# Balanced (auto threads, with DNS)
sudo pingr 10.0.0.0/16
# Regular monitoring script
#!/bin/bash
while true; do
sudo pingr -s 192.168.1.0/24 > /tmp/current_hosts.txt
diff /tmp/previous_hosts.txt /tmp/current_hosts.txt
mv /tmp/current_hosts.txt /tmp/previous_hosts.txt
sleep 300
done
# Find and scan web servers
sudo pingr -s 10.0.0.0/24 | xargs -P10 -I {} curl -s -o /dev/null -w "%{http_code} {}\n" http://{}:80 2>/dev/null
# SSH availability check
sudo pingr -s 192.168.1.0/24 | parallel -j10 "nc -z -w1 {} 22 && echo {} has SSH"
# Generate Ansible inventory
echo "[servers]" > inventory.ini
sudo pingr 10.0.0.0/24 | grep -E "\.1[0-9]{2}" >> inventory.ini
# Linux: Set capabilities to avoid sudo
sudo setcap cap_net_raw+ep $(which pingr)
# macOS: Always requires sudo
# Windows: Run as Administrator
--timeout 3-n to skip DNS resolutionulimit -nIf you're not seeing hostnames even with DNS resolution enabled:
Check if PTR records exist:
# Test reverse DNS lookup
host 192.168.1.1
# Or with specific DNS server
host 192.168.1.1 10.0.0.1
Common reasons:
Solutions:
--dns-server with your domain controller IP: sudo pingr --dns-server 10.0.0.1 192.168.1.0/24--stats flag to see DNS resolution success rateSetting up reverse DNS (for admins):
13.0.10.in-addr.arpa for 10.0.13.0/24)Contributions are welcome! Please feel free to submit a Pull Request.
# Fork and clone
git clone https://github.com/yourusername/pingr.git
cd pingr
# Create feature branch
git checkout -b feature/amazing-feature
# Make changes and test
cargo test
cargo clippy
cargo fmt
# Commit and push
git commit -m "Add amazing feature"
git push origin feature/amazing-feature
Chris Neuwirth CNeuwirth@networksgroup.com GitHub: @cybrly
This project is licensed under the MIT License - see the LICENSE file for details.
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.