Spoofing MAC Addresses

I developed this bash script for my MacBook Air to simply the process of getting devices without a keyboard and mouse authenticated to a wireless network that requires a userid and password, which in my case were an Amazon Echo and Amazon Fire TV Cube that we wanted connected at our rental condo.  This was accomplished by setting the MacBook Air’s MAC address to the MAC address of each of the Amazon devices, which allowed the MacBook Air to complete the authentication process.

-------------
#!/usr/bin/env bash
#
# This script is used to temporarily change the Macbook Air's MAC address
# to the Amazon Echo 3 and the Amazon Fire TV Cube.  This will allow the
# Macbook Air to authenticate to networks that require a userid and password
# by spoofing their MAC addresses.
#

echo Do you want to configure the Amazon Echo 3? [y/n]
read answer
if [ $answer == 'y' ]
then
  echo Make sure the Amazon Echo 3 is powered off, then press Enter.
  read enter
  echo Disconnect from the current Wifi network by holding the Option Key, clicking the Wifi icon at the top and clicking Disconnect from ...
  echo Press enter when completed.
  read enter
  echo Changing the MAC address to the Amazon Echo 3.  Enter the sudo password if prompted.

  sudo ifconfig en0 ether 08:84:9D:17:F3:B7

  echo Now spoofing the Amazon Echo 3 MAC address.  Connect and authorize to the wireless network, then press Enter.
  read enter
fi

echo Do you want to configure the Amazon Fire TV Cube? [y/n]
read answer
if [ $answer == 'y' ]
then
  echo Make sure the Amazon Fire TV Cube is powered off, then press Enter.
  read enter
  echo Disconnect from the current Wifi network by holding the Option Key, clicking the Wifi icon at the top and clicking Disconnect from ...
  echo Press enter when completed.
  read enter
  echo Changing the MAC address to the Amazon Fire TV Cube.  Enter the sudo password if prompted.

  sudo ifconfig en0 ether 00:71:47:77:80:0F

  echo Now spoofing the Amazon Fire TV Cube MAC address.  Connect and authorize to the wireless network, then press Enter.
  read enter
fi

echo Resetting the Macbook Air to its regular MAC address.

echo Disconnect from the current Wifi network by holding the Option Key, clicking the Wifi icon at the top and clicking Disconnect from ...
echo Press enter when completed.
read enter

echo Changing the MAC address to the Macbook Air.  Enter the sudo password if prompted.

sudo ifconfig en0 ether 7C:D1:C3:DF:EC:1F

echo The Macbook Air MAC address has been reset.  Connect to the wireless network.

echo Press enter when completed.
read enter

echo An ifconfig will be performed.  Verify the MAC address is 7C:D1:C3:DF:EC:1F
ifconfig

Spoofing MAC Addresses

I developed this bash script for my MacBook Air to simply the process of getting devices without a keyboard and mouse authenticated to a wir...