约束:
1. 速度很重要。
2.我可以ping一次。
我正在争论是使用 Python 还是 shellscripting。有没有比bash
更快的方法?
这是当前代码,
for ip in $(seq int1 int2); do
ping -c 1 xxx.xxx.xxx.$ip | grep "bytes from" &
done
还有什么比这更快的吗?
最佳答案
你应该使用 NMAP:
nmap -T5 -sP 192.168.0.0-255
关于linux - ping 网络范围并返回响应主机的最快方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14038606/