Last active
February 13, 2016 01:11
-
-
Save thebaer/07d677779af826d95b9d to your computer and use it in GitHub Desktop.
Generate new MAC address for accessing time-limited hotspots
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 | |
# Generate new MAC address for accessing time-limited hotspots like Boingo | |
# Modification may be needed; tested on Chrome OS | |
# No warranty / guarantees made. Use at your own risk. This probably violates some Terms of Service. | |
sudo ifconfig wlan0 down | |
# Source: http://superuser.com/questions/218340/how-to-generate-a-valid-random-mac-address-with-bash-shell | |
sudo ifconfig wlan0 hw ether $(echo -n 00:60:2F; dd bs=1 count=3 if=/dev/random 2>/dev/null | hexdump -v -e '/1 ":%02X"') | |
# OS X: | |
# sudo ifconfig en0 ether $(echo -n 00:60:2F; dd bs=1 count=3 if=/dev/random 2>/dev/null | hexdump -v -e '/1 ":%02X"') | |
sudo ifconfig wlan0 up | |
echo Open an incognito window to your favorite HTTP site. | |
echo Turn wifi off and on again if it does not work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment