本文介绍了如何从arp -a扫描查找MAC地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试从arp上显示的设备中查找MAC地址-a扫描我的wifi网络.在Mac终端中调用"arp -a"的结果如何获得MAC地址?
I am trying to find MAC addresses from devices that show up on arp -a scans on my wifi network. How can I get MAC addresses from these results of calling "arp -a" in Mac terminal?
? (10.10.40.1) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
us114-appletv.francisparker.org (10.10.40.92) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
03089mac.francisparker.org (10.10.40.236) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
02543mac.francisparker.org (10.10.41.9) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
us113-dwalcott-0.francisparker.org (10.10.41.83) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
meghans-air.francisparker.org (10.10.41.123) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
faiths-mbp-2.francisparker.org (10.10.41.132) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
09150mac.francisparker.org (10.10.41.144) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
02758mac.francisparker.org (10.10.41.219) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
02769mac.francisparker.org (10.10.41.234) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
? (10.10.42.99) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
? (10.10.42.113) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
? (10.10.44.44) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
? (10.10.44.201) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
? (10.10.45.77) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
? (10.10.45.123) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
? (10.10.45.151) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
? (10.10.46.6) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
? (10.10.46.137) at 0:90:b:2e:bf:ff on en0 ifscope [ethernet]
谢谢!
推荐答案
你的问题有点不清楚;在上面的输出中清楚地列出了MAC地址.我假设您的意思是如何将 arp
输出转换为以换行符分隔的MAC地址列表?"这只是获取第四列的简单 cut
.
Your question is somewhat unclear; the MAC addresses are clearly listed in the above output. I assume you mean "how do I convert the arp
output into a newline separated list of MAC addresses?" That's just a trivial cut
to get the fourth column.
arp -a | cut -d' ' -f 4
这篇关于如何从arp -a扫描查找MAC地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!