This is a little bash script I wrote to swiftly change my wireless MAC address on Apple OSX if I'm banned from a network. I couldn't find anywhere on the internet showing me how to do this, all sites I checked said MAC address could not be temporarily changed on a Macbook. I know it's not having to do with SEO, but it will be helpful in your life if you do sketchy things on private networks and become blocked.
Code:
#! /bin/bash
# Written by delspon
# Script to spoof airport MAC address
# This script will only work if the address you supply is VALID
clear
echo
echo " *** MAC spoofer for OSX ***"
echo
echo "Is your airport ON? (y or n) "
read -e airportStatus
if [ $airportStatus == 'y' ]; then
echo Your current airport MAC:
eval ifconfig en1 | grep ether
echo
echo Enter desired NEW airport MAC:
read -n 17 MACaddr
echo
echo Disassociating from all networks...
eval sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
echo Spoofed airport MAC to $MACaddr
echo NOTE - restart your computer to revert to hardware MAC...
exec sudo ifconfig en1 ether $MACaddr
else
clear
echo "Turn on airport, then rerun this script."
fi
Last edited: