Created
August 11, 2013 13:28
-
-
Save bbirec/6204893 to your computer and use it in GitHub Desktop.
A simple bash script to change MAC address in MacOS.
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 | |
MAC=${1:-`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`} | |
INF=${2:-"en0"} | |
echo "Set a new MAC address($MAC) for $INF" | |
ifconfig $INF lladdr $MAC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment