Skip to content

Instantly share code, notes, and snippets.

@davidbgk
Forked from vinyll/mac-address-spoofer.sh
Created March 2, 2017 21:53
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 davidbgk/c0645c8fd470a995cd2f2f2d02640c2c to your computer and use it in GitHub Desktop.
Save davidbgk/c0645c8fd470a995cd2f2f2d02640c2c to your computer and use it in GitHub Desktop.
#/bin/sh
# Instructions:
# 1. Copy this script locally and run the following `chmod +x mac-address-spoofer.sh`
# 2. Later, run the following: `./mac-address.spoofer.sh` and see your MAC address changing.
echo "origin MAC address: " `sudo ifconfig en0 ether | grep ether`
sudo ifconfig en0 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
echo "new MAC address: " `sudo ifconfig en0 ether | grep ether`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment