Skip to content

Instantly share code, notes, and snippets.

@typhonius
Created February 22, 2014 23:02
Show Gist options
  • Save typhonius/9163728 to your computer and use it in GitHub Desktop.
Save typhonius/9163728 to your computer and use it in GitHub Desktop.
Sets a new mac address
newmac() {
MAC=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
echo "Setting MAC address to $MAC"
sudo ifconfig en0 ether $MAC
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment