Created
May 21, 2019 15:45
-
-
Save ianldgs/d0198c59149ef2d57876e792a8d3452c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| changeMac() { | |
| local net=${1:-en0} | |
| local mac=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//') | |
| sudo ifconfig $net ether $mac | |
| sudo ifconfig $net down | |
| sudo ifconfig $net up | |
| echo "Your new physical address for interface $net is $mac" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment