Skip to content

Instantly share code, notes, and snippets.

@pch
Created April 23, 2012 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pch/2470964 to your computer and use it in GitHub Desktop.
Save pch/2470964 to your computer and use it in GitHub Desktop.
require 'net/http'
out = `arp-scan -lq`
macs =
out.split("\n").map do |line|
if line =~ /([0-9A-F][0-9A-F :]{16})/i
puts $1
$1.split(' ').join(':').upcase
end
end.compact.join(',')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment