Last active
February 17, 2016 00:24
-
-
Save dvdoliveira/236920043789a3db4c25 to your computer and use it in GitHub Desktop.
Change your Macbook Mac Address to avoid wifi time limit on airports
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
| function mac { | |
| echo `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'` | |
| } | |
| function change_mac { | |
| sudo ifconfig en0 ether `mac` | |
| } | |
| # New implementation found on: | |
| # http://apple.stackexchange.com/a/183370/165855 | |
| change_mac_address { | |
| sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z | |
| sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/./0/2; s/.$//') | |
| networksetup -detectnewhardware | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment