Skip to content

Instantly share code, notes, and snippets.

@bogardpd
Last active July 28, 2018 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogardpd/c6074795b15f19503d675419641286cc to your computer and use it in GitHub Desktop.
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)
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