首页 > 代码库 > I'am The first script
I'am The first script
扫描局域网中的地址,然后只对up的机器发2次包
[root@localhost ~]# cat /etc/centos-release
CentOS release 6.7 (Final)
[root@localhost ~]# uname -a
Linux localhost 2.6.32-573.el6.x86_64 #1 SMP Thu Jul 23 15:44:03 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
#!/bin/bash
clear
date +%y-%m-%d-%H:%M:%S
mount /dev/sr0 /mnt/usb1
wget https://nmap.org/dist/nmap-7.50.tar.bz2
tar -jxvf nmap-7.50.tar.bz2
cd ./nmap-7.50
yum -y install gcc*
./configure -prefix=/usr/local/opop && make && make install
ln -s /usr/local/opop/bin/nmap /bin
for p in `nmap -sn 192.168.0.0/24 |grep $192.168|awk -F "(" ‘{print $2}‘ | sed ‘s/)//g‘`
do
echo "the ip of $p computer is"
ping -c 2 $p
done
I'am The first script
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。