A collection of the best methods to identify live hosts on a network. by RedNeutron
⚠️ For educational purpose only. Only use on networks you have explicit permission to test.
Designed specifically for ping sweep — much faster than regular ping.
fping -a -g 192.168.1.0/24 2>/dev/nullThe fastest scanner in existence — millions of IPs per second.
masscan 192.168.1.0/24 -p0 --pingfor i in {1..255}; do (ping -c 1 172.17.1.$i | grep "bytes from" &); donefping -a -g 192.168.1.0/24 2>/dev/nullMore reliable than ICMP — uses ARP protocol, harder to block.
# Local network
arp-scan --localnet
# Specific range
arp-scan 192.168.1.0/24for /L %i in (1,1,255) do @ping -n 1 -w 200 172.17.1.%i > nul && echo 172.17.1.%i is up.1..255 | ForEach-Object {
$ip = "192.168.1.$_"
if (Test-Connection $ip -Count 1 -Quiet -TimeoutSeconds 1) {
"$ip is UP"
}
}nmap -sn 172.17.1.0/24nmap -sn -T4 192.168.1.0/24nmap -sn -T4 192.168.1.0/24 -oG - | grep "Up" | awk '{print $2}'Cannot be detected by the target — slower but stealthier.
netdiscover -p -r 172.17.1.0/16Useful when no external tools are available.
python3 -c "
import subprocess, ipaddress
[print(ip,'is UP') for ip in ipaddress.IPv4Network('192.168.1.0/24').hosts()
if subprocess.run(['ping','-c1','-W1',str(ip)],capture_output=True).returncode==0]
"| Situation | Best Tool |
|---|---|
| Local network, need speed | arp-scan |
| External network, need speed | fping or nmap -T4 |
| Stealth, avoid detection | netdiscover -p |
| Massive range scan | masscan |
| Windows, no extra tools | PowerShell |
| No tools available at all | Python oneliner |
Bravo! Feel free to develop these things — but remember, educational purpose only.