Last active
July 28, 2018 03:56
-
-
Save bogardpd/c6074795b15f19503d675419641286cc to your computer and use it in GitHub Desktop.
Script to toggle between Switch and laptop MAC for logging into hotel wifi (xx:xx:xx:xx:xx:xx is the Switch's MAC address, and yy:yy:yy:yy:yy:yy is the laptop's 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
sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx | |
networksetup -setairportpower en0 off | |
networksetup -setairportpower en0 on | |
echo | |
echo -e "Now using $(tput bold)$(tput setaf 6)Nintendo $(tput setaf 1)Switch$(tput sgr0) MAC address (xx:xx:xx:xx:xx:xx)" | |
read -p "Press ENTER to change back to native MAC address" | |
sudo ifconfig en0 ether yy:yy:yy:yy:yy:yy | |
networksetup -setairportpower en0 off | |
networksetup -setairportpower en0 on | |
echo | |
echo -e "Now using $(tput bold)$(tput setaf 3)Macbook$(tput sgr0) native MAC address (yy:yy:yy:yy:yy:yy)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment