# Ping Sweep - Bash ```bash for i in {1..254} ;do (ping -c 1 172.16.5.$i | grep "bytes from" &) ;done ``` # Ping Sweep - CMD ```powershell for /L %i in (1 1 254) do ping 172.16.5.%i -n 1 -w 100 | find "Reply" ``` # Ping Sweep - PowerShell ```powershell 1..254 | % {"172.16.5.$($_): $(Test-Connection -count 1 -comp 172.16.5.$($_) -quiet)"} ``` # Ping Sweep - Meterpreter ```bash meterpreter > run post/multi/gather/ping_sweep RHOSTS=172.16.5.0/23 ```