Introducing the ARP scanner gem
Prerequisites
sudo apt-get install arp-scan
Usage
require 'arpscanner'
scanner = ArpScanner.new
a = scanner.scan
Output (extract):
[{:ip=>"192.168.4.1", :mac=>"20:e5:2a:d4:96:7f", :mfr=>"(Unknown)"}, {:ip=>"192.168.4.16", :mac=>"00:10:01:10:2b:50", :mfr=>"Citel"}, {:ip=>"192.168.4.126", :mac=>"b8:27:eb:79:9f:00", :mfr=>"Raspberry Pi Foundation"}, {:ip=>"192.168.4.135", :mac=>"b8:27:eb:54:e9:cc", :mfr=>"Raspberry Pi Foundation"}, {:ip=>"192.168.4.140", :mac=>"b8:27:eb:bb:39:10", :mfr=>"Raspberry Pi Foundation"}, {:ip=>"192.168.4.149", :mac=>"b8:27:eb:4a:0a:1
Resources
- arpscanner https://rubygems.org/gems/arpscanner
arp scanner ip scan arpscanner