Last active
August 29, 2015 14:02
-
-
Save mauron85/6331bb0e7ff6eee45b8d to your computer and use it in GitHub Desktop.
Randomize MAC Address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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