• 欢迎访问IT乐园(o゚▽゚)o
  • 推荐使用最新版火狐浏览器和Chrome浏览器访问本网站。

通过 nmap 扫描树莓派设备(raspberry pie)

代码 fhy 4年前 (2020-01-19) 6800次浏览 0个评论
文章目录[隐藏]

因树莓派 mac 地址以 B8:27:EB 开头

第一种方法

故结合 awk 运行命令:

sudo nmap -sP 192.168.5.0/24 | awk '/Nmap scan/{ip=$NF;next}ip && /B8:27:EB/{print ip, $3}'

返回:

192.168.5.60 B8:27:EB:84:**:**
192.168.5.69 B8:27:EB:B4:**:**
192.168.5.93 B8:27:EB:BB:**:**
192.168.5.129 B8:27:EB:41:**:**
192.168.5.183 B8:27:EB:16:**:**
192.168.5.216 B8:27:EB:EE:**:**

后 2 个字节已隐藏

第二种方法

通过 arp 命令
扫描速度更快

$ arp -na | grep -i b8:27:eb
? (192.168.5.69) at b8:27:eb:b4:**:** [ether] on enp1s0
? (192.168.5.60) at b8:27:eb:84:**:** [ether] on enp1s0
? (192.168.5.211) at b8:27:eb:43:**:** [ether] on enp1s0
? (192.168.5.93) at b8:27:eb:bb:**:** [ether] on enp1s0
? (192.168.5.183) at b8:27:eb:16:**:** [ether] on enp1s0
? (192.168.5.216) at b8:27:eb:ee:**:** [ether] on enp1s0
? (192.168.5.129) at b8:27:eb:41:**:** [ether] on enp1s0

IT 乐园 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:通过 nmap 扫描树莓派设备(raspberry pie)
喜欢 (13)
关于作者:
九零后挨踢男
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址