for /l %%i in (10,1,10) do for /l %%n in (1,1,254) do echo ping 192.168.%%i.%%n -n 1|find /i "TTL="
#!/bin/bash
ip=192.168
for addr16 in $(seq 1 254);
do
for addr24 in $(seq 1 254);
do
ping -c 1 $ip.$addr16.$addr24|grep "bytes from"|awk '{print $4}'|awk -F':' '{print $1}'
done
done
儲存爲xx.sh執行即可