Sken IP adres na UBNT: Porovnání verzí
Z Wiki UnArt Slavičín
Skočit na navigaciSkočit na vyhledávání
Bez shrnutí editace |
Bez shrnutí editace |
||
Řádek 30: | Řádek 30: | ||
address="192.168.1."; | address="192.168.1."; | ||
port=80; | port=80; | ||
for i in `seq | start=1; | ||
end=254; | |||
for i in `seq $start $end`; | |||
do | do | ||
wget -qO- http://$address$i:$port >/dev/null 2>&1 && echo $address$i; | wget -qO- http://$address$i:$port >/dev/null 2>&1 && echo $address$i; | ||
done | done |
Verze z 6. 10. 2022, 13:49
Přes SSH v konzoli (pokud je rozsah jiný než 192.168.1.0/24, upravte proměnnou address):
ping
address="192.168.1."; for i in `seq 1 254`; do up=`ping -c1 -W1 $address$i | grep "1 packets received" | wc -l`; if [ "$up" -eq 1 ]; then echo $address$i; fi; done
arping
address="192.168.1."; iface="br0"; for i in `seq 1 254`; do up=`arping -c1 -w1 -I $iface $address$i | grep "Received 1 replies" | wc -l`; if [ "$up" -eq 1 ]; then echo $address$i; fi; done
wget
address="192.168.1."; port=80; start=1; end=254; for i in `seq $start $end`; do wget -qO- http://$address$i:$port >/dev/null 2>&1 && echo $address$i; done