Skip to content

Instantly share code, notes, and snippets.

@mauron85
Last active August 29, 2015 14:02
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 mauron85/6331bb0e7ff6eee45b8d to your computer and use it in GitHub Desktop.
Save mauron85/6331bb0e7ff6eee45b8d to your computer and use it in GitHub Desktop.
Randomize MAC Address
#!/bin/bash
#inspired from: http://osxdaily.com/2012/03/01/change-mac-address-os-x/
mac_add=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
sudo ifconfig en0 ether $mac_add
echo "Your you MAC address is: $(ifconfig en0 |grep ether)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment