Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detect unused IP addresses in the LAN

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report