Skip to content

Instantly share code, notes, and snippets.

@jsbonso
Created January 7, 2020 05:58
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 jsbonso/0a4543acf98d9505f8aae243f3cfd890 to your computer and use it in GitHub Desktop.
Save jsbonso/0a4543acf98d9505f8aae243f3cfd890 to your computer and use it in GitHub Desktop.
Generates a new MAC address for your macbook to bypass the Free WIFI limit in Malls/ Cafes
#!/bin/bash
#
COUNTER=0
echo "Generating Random MAC Address..."
while [ $COUNTER -lt 100 ]; do
mac=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
#echo "$mac"
if [ ${mac:0:2} = 80 ]
then
echo "$mac"
break
else
continue
let COUNTER=COUNTER+1
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment