ping alive

fping -a 192.168.56.1 192.168.56.255 -g 2>/dev/null

 

#!/bin/bash

for ip in 192.168.56.{1..255} ;
do (
    ping $ip -c 2 &> /dev/null ;

    if [ $? -eq 0 ] ; then
        echo $ip is alive
    fi
   )&
done

 

nmap -nsP 192.168.56.0/24

 

#!/bin/bash

for ip in 192.168.56.{1..255} ;
do
    ping $ip -c 2 &> /dev/null ;

    if [ $? -eq 0 ] ; then
        echo $ip is alive
    fi
done

 

posted @ 2020-08-07 17:37  fndefbwefsowpvqfx  阅读(138)  评论(0编辑  收藏  举报