Skip to content

Instantly share code, notes, and snippets.

@eliask
Created June 9, 2017 14:33
Show Gist options
  • Save eliask/85349ec8b6842d8523d2861b72857501 to your computer and use it in GitHub Desktop.
Save eliask/85349ec8b6842d8523d2861b72857501 to your computer and use it in GitHub Desktop.
Randomize MAC address periodically with spoof-mac (brew install spoof-mac) -- Useful for time-limited wifi hotspots
#! /bin/sh
if test $# = 0 ; then
echo "Usage: $0 <sleep interval like 15m>"
exit 1
fi
while true
do
echo "Randomizing MAC now"
spoof-mac randomize en0
echo "Randomized. Sleeping for: $@"
sleep "$@"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment