Skip to content

Instantly share code, notes, and snippets.

@graste
Forked from DouglasSherk/mac_address_randomize.sh
Created February 8, 2014 15:24
Show Gist options
  • Save graste/8885397 to your computer and use it in GitHub Desktop.
Save graste/8885397 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
# You might want to note your old MAC address here. Use this to get it:
# ifconfig en0 | grep ether
MAC_ADDRESS=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
echo "Setting MAC address..."
sudo ifconfig en0 ether $MAC_ADDRESS
ifconfig en0 | grep ether
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment