Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Detect unused IP addresses in the LAN

Shulou Source: shulou.com Published: 2022-06-01 06:53:05 10月03日 Update

Temporarily detect unused IP addresses in the LAN

#! / bin/bashecho "detects unused IP addresses 2015" echo "processbar () {local current=$1; local total=$2; local maxlen=80; local barlen=66; local perclen=14; local format="%-${barlen} s% $((maxlen-barlen)) s "local perc=" [$current/$total] "local progress=$ ((current*barlen/total)) local prog=$ (for i in `seq 0$ Secrets`; do printf'#') in the LAN Done) printf "\ r$format" $prog $perc} for i in `seq 1 254`; do processbar $($item254)) 100 / usr/bin/arping-I eth0-c 1 192.168.10.Secreti | grep-B2 "Received 0" | head-1 > > mac$ (date +% Y%m%d) .txt; done

The progress bar of the loop in the program is referenced from: http://blog.csdn.net/wxqee/article/details/38332141

Or use the

#! / bin/bashecho looks for unused IP addresses and detects MAC to find them. If it is not powered on, it cannot be found! For ((iTun1; I > mac$ (date +% Y%m%d) .txt; # sleep 3 echo-e "--> $($itims100x254)%\ c" doneecho has been exported to the mac$ (date +% Y%m%d) .txt file in the current directory, please check!

Tags: Address Detection Local area LAN File Directory Program Progress reference Loop output Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS MariaDB Shulou Information Shulou Technology Docker