Skip to content

Instantly share code, notes, and snippets.

@rweald
Created August 27, 2012 17:20
Show Gist options
  • Save rweald/3490531 to your computer and use it in GitHub Desktop.
Save rweald/3490531 to your computer and use it in GitHub Desktop.
Little Ruby script to spoof a mac address
#!/usr/bin/env ruby
puts "Please Enter Your MAC Address: "
mac = gets
mac = mac.strip
`sudo /bin/bash -lc "sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z && sudo ifconfig en0 ether #{mac}"`
puts "Congratulations you now have #{mac} as your MAC address"
puts "\nYou must now reconnect to the WiFi."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment